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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux