Re: Escaping Regex Chars with addcslashes()
| From: | Nick Wilson | Date: | Wed, 29 Sep 2004 09:52:37 +0000 |
| Subject: | Re: Escaping Regex Chars with addcslashes() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198168@lists.php.net to get a copy of this message | ||
* and then Marek Kilimajer declared....
> >If i want to find a url on a page, there are some chars i need to escape
> >right?
> >
> >like '/' and '?'
> >
> >do i also need to escape '.'?
> >Are there any other things that might pop up in a url that I can escape
> >with addcslashes()?
> Don't use posix regexp, but use perl compatible instead. It has
> preg_quote() function that is intended for this purpose.
I'll go look it up, thanks Marek ;-)
--
Nick W