Re: matching some first part of word
| From: | Hugh Bothwell | Date: | Sun, 11 May 2003 03:19:20 +0000 |
| Subject: | Re: matching some first part of word | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147181@lists.php.net to get a copy of this message | ||
"Qt" <web_tur@yahoo.com> wrote in message
news:20030510222008.56985.qmail@pb1.pair.com...
> I would like to find words which are starting with "ye", I try to use
> preg_match and many friends help from this form.
>
> But I have no idea can I make above idea with perg_match. basicaly I am
> using like this;
>
> if (preg_match("/\b(ye)\b/i", $mesage, $matches)) {
>
> but this is find complete "ye" word. I want to find words which are
starting
> with "ye".
preg_match_all("/\b(ye[^\W]*)/i", $message, $matches, PCRE_SET_ORDER);