function preg_quote( str ) { // Quote regular expression characters // // + original by: booeyOH // + improved by: Ates Goral (http://magnetiq.com) return str.replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, "\\$1"); }
preg_quote("$40");
preg_quote("*RRRING* Hello?");
preg_quote("\\.+*?[^]$(){}=!<>|:");
Дерево всех статей