note 101337 added to class.regexiterator
| From: | jinmoku at hotmail dot com | Date: | Fri, 10 Dec 2010 20:28:18 +0000 |
| Subject: | note 101337 added to class.regexiterator | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-174784@lists.php.net to get a copy of this message | ||
An exemple :
$a = new ArrayIterator(array('test1', 'test2', 'test3'));
$i = new RegexIterator($a, '/^(test)(\d+)/', RegexIterator::REPLACE);
$i->replacement = '$2:$1';
print_r(iterator_to_array($i));
/*
Array
(
[0] => 1:test
[1] => 2:test
[2] => 3:test
)
*/
----
Server IP: 69.147.83.197
Probable Submitter: 85.69.208.43
----
Manual Page -- http://www.php.net/manual/en/class.regexiterator.php
Edit -- https://master.php.net/note/edit/101337
Del: integrated -- https://master.php.net/note/delete/101337/integrated
Del: useless -- https://master.php.net/note/delete/101337/useless
Del: bad code -- https://master.php.net/note/delete/101337/bad+code
Del: spam -- https://master.php.net/note/delete/101337/spam
Del: non-english -- https://master.php.net/note/delete/101337/non-english
Del: in docs -- https://master.php.net/note/delete/101337/in+docs
Del: other reasons-- https://master.php.net/note/delete/101337
Reject -- https://master.php.net/note/reject/101337
Search -- https://master.php.net/manage/user-notes.php