I need the regex code for Pawn. I need a code which I can use with preg_replace, too.
Also what i use, is worse...
So, my code is.
$text = preg_replace('/([\\\\\|\'|"])/', '\\\$1', $text);
Is this right? This code would replace the in PHP documentation given characters etc. But it replaces all \ :/ \n etc., too!
Have you a Code, which only replaces the following characters? http://de3.php.net/manual/de/function.mysql-real-escape-string.php
\x00, \n, \r, \, ', " und \x1a