Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Regular Expression Help?

0 views
Skip to first unread message
Message has been deleted

J.O. Aho

unread,
Jul 3, 2010, 2:29:06 AM7/3/10
to
Jim Higgins wrote:
>
> For use with preg_replace() I need a regular expression that will
> match Mcdonald and Macpherson, but not Mack or any other four-letter
> word starting with Mac.
>
> Ma?c works for the first two, but it also matches Mack (etc). I'm
> drawing a blank.
>
> Help? Thanks.

{5,} = five or more characters in the sequence that you.

example can be found at: http://www.php.net/preg_replace

--

//Aho

0 new messages