note 38480 added to function.substr-count
| From: | YinfoY at Ykarl-philippY dot YdeY | Date: | Tue, 23 Dec 2003 17:37:51 +0000 |
| Subject: | note 38480 added to function.substr-count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-62380@lists.php.net to get a copy of this message | ||
Unfortunately I did a slight mistake in my contribution on Dec/21/2003. I apologize it.
In the last section "Firstly a string ..." I erroneously described the moving of the
pointer when the lookahead feature is used. It shall be replaced by the following explanation:
Firstly the regular expression tries to match the string "cg". If true the regular
expression looks ahead whether a 'c' can be matched. It this matching is true too, the
pointer is going to be moved to the end of the previously matched string "cg". But despite
of the occurence of the character 'c' that follows the string "cg" the pointer
is not moved to the end of the complete string "cgc".
Now from the new pointer position the function preg_match_all searches for the next occurence of the
string "cgc".
----
Manual Page -- http://www.php.net/manual/en/function.substr-count.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38480
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38480&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38480&report=yes
Search -- http://master.php.net/manage/user-notes.php