Re: matching some first part of word
| From: | qt | Date: | Mon, 12 May 2003 06:24:43 +0000 |
| Subject: | Re: matching some first part of word | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147229@lists.php.net to get a copy of this message | ||
tahnk you
"Hugh Bothwell" <hugh_bothwell@hotmail.com> wrote in message
news:20030511031850.19309.qmail@pb1.pair.com...
>
> "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);
>
>