note 58510 added to pcre.pattern.syntax
| From: | (seanj.jcink.com) | Date: | Sun, 06 Nov 2005 22:17:18 +0000 |
| Subject: | note 58510 added to pcre.pattern.syntax | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-98170@lists.php.net to get a copy of this message | ||
Is there any possible way to index the matches by a subpattern? This could greatly decrease my
execution time and shorten my script.
Example:
preg_match_all("@(key1|key2|key3)@",$input,$matches["\\1"]);
I know that will not work, but is there any way to do that? Thanks.
~Sean
----
Manual Page -- http://www.php.net/manual/en/pcre.pattern.syntax.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58510
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58510&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58510&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58510&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58510&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58510&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58510&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58510&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58510&report=yes
Search -- http://master.php.net/manage/user-notes.php