note 30800 deleted from function.ereg by didou
| From: | didou@php.net | Date: | Sun, 07 Dec 2003 03:00:46 +0000 |
| Subject: | note 30800 deleted from function.ereg by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-61559@lists.php.net to get a copy of this message | ||
Note Submitter: scott@millerco.net
----
OK maybe I am just dense but this took me a long time to realize. The first part of an expression
like "bob.*john" selects the first bob and the last john in a string. For example:
$string = "bob john bill ken paul scott peter paul mary kim sue";
eregi("john.*paul", $string, $return_string);
echo($return_string[0]);
Returns:
john bill ken paul scott peter paul
Instead of:
john bill ken paul
I hope this helps someone.