Hi,
[I precede you, sorry for language mistakes...]
I have done a pretty regex which can normally strip all the empties HTML
tags. With PHP v5.2.4, under Windows XP, preg_replace() gives me 90
matches (which is correct) while under linux it stagnate to 54.
Let me introduce this regex :
$pattern = '
@
<([a-z0-9]+)[^>]*> # open tag
(?:[\s|(?: )]*| # white characters (ugly ?)
(?R))* # recursion (parent tag is empty to ?)
</\s*\1\s*> # close tag
@Sux'; // I love those pattern's options !! :-D)
So, is it normal that I have this big difference for matches (Windows vs
Linux) ?
I thought it was a recursion trouble so I include the preg_replace() in
a do/while structure. It did not change anything...
If anyone can tell me about it, it will be a pleasure !
--
Julien
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php