Re[2]: [PHP] preg help please :)

From: Date: Fri, 17 Oct 2003 01:29:28 +0000
Subject: Re[2]: [PHP] preg help please :)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-166386@lists.php.net to get a copy of this message
Hi, Friday, October 17, 2003, 10:26:40 AM, you wrote: JF> On Thursday, October 16, 2003, at 04:32 PM, Eugene Lee wrote: >> Try inverting the greediness with a "U" pattern modifier: >> >> "/$quote(.*)$quote:$quote(.*)$quote/U" >> >> For more details: >> >> http://www.php.net/manual/en/pcre.pattern.modifiers.php >> JF> Nope -- didn't help sorry... if there's two links in a block of text, JF> it will match from the start of the first one all the way through to JF> the end of the second one. JF> I think I need: JF> "/$quote(<!$quote>*)$quote:$quote(<!$quote>*)$quote/" JF> Where <!$quote> is substituted for the correct expression -- but my JF> skills aren't there yet :) JF> Justin I think you need (.*?) to stop the * being greedy, but I am no guru on this martian language either. -- regards, Tom

« previous php.general (#166386) next »