RE: [PHP] newbie question about preg_match
| From: | Chris W. Parker | Date: | Thu, 20 May 2004 20:56:05 +0000 |
| Subject: | RE: [PHP] newbie question about preg_match | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-186626@lists.php.net to get a copy of this message | ||
Al <mailto:news@ridersite.org>
on Thursday, May 20, 2004 12:51 PM said:
> If I have multiple instances that match the pattern, but only want the
> first one, which is the best way to handle it?
reread the last sentence in John's post.
> John W. Holmes wrote:
>
>> From: "Al" <news@ridersite.org>
[snip]
>> Note that this will only return one match when there could be more,
>> depending upon your string. If you want all of them, use
>> preg_match_all().
hth,
chris.