Re: Help with simple regular expression

From: Date: Mon, 25 Jun 2001 07:27:11 +0000
Subject: Re: Help with simple regular expression
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-55114@lists.php.net to get a copy of this message
That's because POSIX is greedy. Or Perl is greedy. Whatever. When one of them does that, use the other one. Instead of eregi, use pregi. Disclaimer: What I know about Regex could fit in a matchbook. -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: "Aral Balkan" <aral@aralbalkan.com> Newsgroups: php.general Sent: Sunday, June 24, 2001 7:34 PM Subject: [PHP] Help with simple regular expression > Hi all, > > I'm trying to match the body tag in an HTML file (eg. <body > bgcolor="ffffgg">) with the following regular expression and 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! To > me the regex reads match string that begins with <body followed by zero or > more of anything and ending with a greater-than sign. > > Any help would be greatly appreciated! :) > > Aral > ______________________________ > (aral@kismia.com) > New Media Producer, Kismia, Inc. > (aral@american.edu) > Adj. Prof., American University > ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#55114) next »