Re: Help with simple regular expression

From: Date: Mon, 25 Jun 2001 09:49:03 +0000
Subject: Re: Help with simple regular expression
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-55123@lists.php.net to get a copy of this message
On Monday 25 June 2001 09:27, Richard Lynch wrote: > That's because POSIX is greedy. Or Perl is greedy. Whatever. Perl is greedy. It *should* have worked with eregi... > > <body.*> > > > > Unfortunately it matches everything from the body tag onwards and > > doesn't stop at the greater-than sign. It should be simple thing but > > I'm stumped! Greedy means: it tries to match as much as possible. In your case it matches "<body" and then everything up to, and including, "</html>" - a string starting with "<body" and ending with ">" :) -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match. - /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him.

« previous php.general (#55123) next »