note 128089 added to class.regexiterator
| From: | chris dot snyder at totara dot com | Date: | Fri, 06 Jan 2023 06:29:18 +0000 |
| Subject: | note 128089 added to class.regexiterator | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220045@lists.php.net to get a copy of this message | ||
In case the difference between modes RegexIterator::MATCH and RegexIterator::GET_MATCH is not
immediately clear:
MATCH will only return one value per matched element, as a string.
GET_MATCH will return as many values, per matched element, as there are sub-patterns. If there are
sub-patterns, each iteration returns an indexed array with the full pattern match at 0 and each of
the sub-pattern matches as another element.
If there are no sub-patterns, the behaviour of GET_MATCH is the same as MATCH.
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.158.213 (proxied: 2407:7000:aa59:a00:ec3e:b2a1:4c3b:67be)
----
Manual Page -- https://php.net/manual/en/class.regexiterator.php
Edit -- https://main.php.net/note/edit/128089
Del: integrated -- https://main.php.net/note/delete/128089/integrated
Del: useless -- https://main.php.net/note/delete/128089/useless
Del: bad code -- https://main.php.net/note/delete/128089/bad+code
Del: spam -- https://main.php.net/note/delete/128089/spam
Del: non-english -- https://main.php.net/note/delete/128089/non-english
Del: in docs -- https://main.php.net/note/delete/128089/in+docs
Del: other reasons-- https://main.php.net/note/delete/128089
Reject -- https://main.php.net/note/reject/128089
Search -- https://main.php.net/manage/user-notes.php