Posted by tim on 05/11/06 00:17
squash@peoriadesignweb.com wrote:
> I have a string equal to 'www/' that I want to use in a preg_match. Php
> keeps giving me the warning:
>
> Warning: preg_match(): Unknown modifier '/'
>
> How can I escape the string so the / in www/ is not interpreted in the
> preg_match ?
Either with \
preg_match( '/www\//', $str )
or use a diffrent charcter as a delimiter
preg_match( '|www/|', $str )
Tim
[Back to original message]
|