Re: PHP function inside a regex - possible?

From: Date: Fri, 02 Jun 2000 15:55:46 +0000
Subject: Re: PHP function inside a regex - possible?
Groups: php.general 
Request: Send a blank email to php-general+get-908@lists.php.net to get a copy of this message
> Try putting a g after the /e in your regex. Perl regular expressions > stop at newlines by default - the g modifier makes the regex consider > newlines to be just another character. You might also need to make the > expression non-greedy to keep it from eating up everything between the > first <b> and the last </b> in the text. If this is the case add a U > after the g. This is wrong. PHP's Perl style regexps do not recognize /g modifier - preg_replace() is global by default. -Andrei "Later in this talk, I intend to define the universe and give three examples." -- Larry Wall

« previous php.general (#908) next »