Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php regex named groups

It is possible to name a subpattern using the syntax (?P<name>pattern).
This subpattern will then be indexed in the matches array by its normal
numeric position and also by name. PHP 5.2.2 introduced two alternative
syntaxes (?<name>pattern) and (?'name'pattern).
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #regex #named #groups
ADD COMMENT
Topic
Name
9+2 =