php - preg_replace ranged out - compilation failed -
in code:
$c = preg_replace('#[^a-z0-9áčďéěíňóřšťúůýž_-:().,;!?]#i', '', $_post['c']);
i error:
warning: preg_replace() [function.preg-replace]: compilation failed: range out of order in character class @ offset 40
idk error.
do way:
$c = preg_replace('#[^a-z0-9áčďéěíňóřšťúůýž_\-:().,;!?]#i', '', $_post['c']);
you need escape -
inside square brackets [..]
because it's treated interval specifier
Comments
Post a Comment