note 38480 deleted from function.substr-count by nlopess
| From: | nlopess@php.net | Date: | Mon, 07 Jun 2004 09:42:39 +0000 |
| Subject: | note 38480 deleted from function.substr-count by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-70498@lists.php.net to get a copy of this message | ||
Note Submitter: YinfoY@Ykarl-philippY.YdeY
----
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".