Re: The difference between ereg and preg? [SOLVED]

From: Date: Sun, 06 Aug 2006 15:14:12 +0000
Subject: Re: The difference between ereg and preg? [SOLVED]
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.general 
Request: Send a blank email to php-general+get-240199@lists.php.net to get a copy of this message
Robert, Thank you for pointing me to the relevant part of TFM that I needed to R. The final regular expression that I have settled on that is reliably producing expected results is: #<li>(.*)<br>#isU" This finds all the text between a <li> and <br> tag. I found that it was helpful for me to restrict the the tags down to simple constructs, instead of having "<li[^>]*>", because in the source I'm using, the <li> and <br> tags never have additional parameters. Having a more flexible <li> definition was causing confusion with a <link> tag elsewhere in the source. Anyway, the point is that it works very well now. Thanks to the PHP list, especially Jochem, Ligaya, Dave, Robert, Mike, Robert, Adam, and John, for all your helpful information and advice. -- Dave M G

« previous php.general (#240199) next »