#22371 [Fbk->NoF]: ereg_replace moving ! to start of string
| From: | sniper@php.net | Date: | Mon, 10 Mar 2003 00:59:10 +0000 |
| Subject: | #22371 [Fbk->NoF]: ereg_replace moving ! to start of string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-35189@lists.php.net to get a copy of this message | ||
ID: 22371
Updated by: sniper@php.net
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] iliaa@php.net
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