Do this way:
$c = preg_replace('#[^a-z0-9áčďéěíňóřšťúůýž_\-:().,;!?]#i', '', $_POST['c']);
you need to escape -
inside square brackets [..]
because it's treated as interval specifier
문제
In my code:
$c = preg_replace('#[^a-z0-9áčďéěíňóřšťúůýž_-:().,;!?]#i', '', $_POST['c']);
I get this error:
Warning: preg_replace() [function.preg-replace]: Compilation failed: range out of order in character class at offset 40
IDK where could be the error.
해결책
Do this way:
$c = preg_replace('#[^a-z0-9áčďéěíňóřšťúůýž_\-:().,;!?]#i', '', $_POST['c']);
you need to escape -
inside square brackets [..]
because it's treated as interval specifier