((.|\n)*?)/i;
/** Finds body section in HTML
* @type RegExp
*/
Xinha.RE_body = /]*>((.|\n|\r|\t)*?)/i;
/** Special characters that need to be escaped when dynamically creating a RegExp from an arbtrary string
* @private
* @type RegExp
*/
Xinha.RE_Specials = /([\/\^$*+?.()|{}\[\]])/g;
/** When dynamically creating a RegExp from an arbtrary string, some charactes that have special meanings in regular expressions have to be escaped.
* Run any string through this function to escape reserved characters.
* @param {string} string the string to be escaped
* @returns string
*/
Xinha.escapeStringForRegExp = function (string)
{
return string.replace(Xinha.RE_Specials, '\\$1');
};
/** Identifies email addresses
* @type RegExp
*/
Xinha.RE_email = /^[_a-z\d\-\.]{3,}@[_a-z\d\-]{2,}(\.[_a-z\d\-]{2,})+$/i;
/** Identifies URLs
* @type RegExp
*/
Xinha.RE_url = /(https?:\/\/)?(([a-z0-9_]+:[a-z0-9_]+@)?[a-z0-9_\-]{2,}(\.[a-z0-9_\-]{2,}){2,}(:[0-9]+)?(\/\S+)*)/i;
/** This object records for known plugins where they can be found
* this is used by loadPlugin to avoid having to test multiple locations
* when we can reasonably know where the plugin is because it is
* part of the distribution.
*
* This becomes important because of CoRS and a problem with Amazon S3
* in which it does not poroduce a necessary header to Chrome if Chrome
* first requests a script as part of loading a