// Adding characters to escape for an regex in method Tools::pRegexp()

This commit is contained in:
lLefevre committed 2012-03-13 12:48:15 +00:00
1 parent f2fa47772d
commit cc25088d93
1 file changed
+1 -1
+1 -1
View File
@@ -1832,7 +1832,7 @@ FileETag INode MTime Size
public static function pRegexp($s, $delim) public static function pRegexp($s, $delim)
{ {
$s = str_replace($delim, '\\'.$delim, $s); $s = str_replace($delim, '\\'.$delim, $s);
foreach (array('?', '[', ']', '(', ')', '{', '}', '-', '.', '+', '*', '^', '$') as $char) foreach (array('?', '[', ']', '(', ')', '{', '}', '-', '.', '+', '*', '^', '$', '`', '"', '%') as $char)
$s = str_replace($char, '\\'.$char, $s); $s = str_replace($char, '\\'.$char, $s);
return $s; return $s;
} }