Re: Using eregi_replace()

From: Date: Fri, 01 Aug 2003 15:51:38 +0000
Subject: Re: Using eregi_replace()
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-157970@lists.php.net to get a copy of this message
> > you could also use different delimiters and write for example: > '/.*?(hello.*going).*/' or '[.*?(hello.*going).*]' the regular > expression itself is merely ".*?(hello.*going).*" which matches the > whole string and replaces it by the first matching expression > sourrounded in by ()s (thats the '$1'). > > just a minor correction, i don't believe you could use '[.*?(hello.*going).*]' as the delimiters have to be the same character. the reason you use delimiters is so that you can use PREG modifiers after the last delimiter, but still inside the expression. read up in the manual, as the posibilities of PREG are enourmous... -skate-

« previous php.general (#157970) next »