#13547 [Opn->Csd]: String position of preg_match_all
| From: | iliaa@php.net | Date: | Sun, 17 Aug 2003 21:40:34 +0000 |
| Subject: | #13547 [Opn->Csd]: String position of preg_match_all | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-46072@lists.php.net to get a copy of this message | ||
ID: 13547
Updated by: iliaa@php.net
Reported By: ejbe99 at hotmail dot com
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: Windows
PHP Version: 4.0.6
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2001-10-04 15:41:41] ejbe99 at hotmail dot com
Hello.
I am not sure if a lot of other people would want this, but a humungous
amount of programmers I know need this.
There should be a feature in php, a function like
preg_mall_strpos or another parameter in preg_match_all.
What it should do is in each set of matches in preg_match_all, it
should also give the string position
of the match. This means $matches would look like this:
Array(0=>Array(0=>Array(0=> blah 1=> nother blah)
1=>Array(0=> 30 1=>52)));
The reason we wouldn't just use preg_replace,
is because a lot of us need to replace a mass
amount of matches according to the previous or future match. Without
this you would need a very complicated function --- Well not too
complicated, but if it is a
common problem you should make the parameter.
Thanks in advance!
EJ
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=13547&edit=1