ID: 22371 Updated by: [EMAIL PROTECTED] Reported By: phpbugreport at webfroot dot co dot nz -Status: Feedback +Status: No Feedback Bug Type: Regexps related Operating System: Windows XP PHP Version: 4.3.0 New Comment:
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2003-02-22 14:15:47] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip With latest CVS I get: bacon <a href='http://www.whatever.com'>hello</a> as the result of the regular expression. ------------------------------------------------------------------------ [2003-02-22 01:22:55] phpbugreport at webfroot dot co dot nz Running Apache 1.3 as a service on Windows XP $text = ereg_replace ("<a[^>]+href *= *([^ ]+)[^>]*>", "<a href=\\1>", $text); The above line of code is supposed to find all a tags and strip any attributes except href. However: $text = "bacon <a href='http://www.whatever.com' title='hello!'>hello</a>"; will be set to: bacon !<a href='http://www.whatever.com' title='hello'>hello</a> How in the hell did that exclaim get to the start of the a tag? Maybe I'm just doing something wrong, but it looks like a bug to me. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22371&edit=1