Re: Regular Expression by Exception

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't know how to use the POSIX classes, but if you use preg_replace:
preg_replace("/[^$params]/", '', $string);

I think this will work.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



Alberto García Gómez wrote:
> Fellows:
>
> If I use ereg_replace($params, $string) I can replace the char that
> match with $params in the $string.
>
> BUT, how I can replace ALL chars EXCEPT the chars in $params.
>
> Something like !$params, I think
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux