
Added by thebman220 on October-12-2008, 9:36 pm
/**
* @param string str : A string containing a regular expression
* @return object : A RegExp object on success or null otherwise
*/
function parseRegExp(str) {
var start=str.indexOf("/");
var end=str.lastIndexOf("/");
if (start==end) {return null;}
var reg=str.substring(start+1,end);
var flags=str.substring(end+1);
return new RegExp(reg,flags);
}
Added by thebman220 on October-14-2008, 4:36 pm
Added by thebman220 on October-13-2008, 5:01 pm
Added by thebman220 on October-13-2008, 12:13 am
Added by thebman220 on October-12-2008, 10:22 pm
Added by thebman220 on October-12-2008, 9:20 pm