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

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