RegExp.escape=function(text){if(!arguments.callee.sRE){var specials=['/','.','*','+','?','|','$','^','(',')','[',']','{','}','\\'];arguments.callee.sRE=new RegExp('(\\'+specials.join('|\\')+')','g');}
return text.replace(arguments.callee.sRE,'\\$1');}