I just tried it on 4.1.x and it is working fine. On Thu, 28 Mar 2002, Sharat Hegde wrote:
> Rasmus, > > The code worked fine in PHP Version 3.x > > It does not work with PHP Version 4.1.1. That is where I have a problem. > > With Regards, > Sharat > > >From: Rasmus Lerdorf <[EMAIL PROTECTED]> > >To: Sharat Hegde <[EMAIL PROTECTED]> > >CC: [EMAIL PROTECTED] > >Subject: Re: [PHP] Regular Expression Problem continues > >Date: Thu, 28 Mar 2002 02:33:16 -0800 (PST) > > > >This code works fine: > > > >eregi("__([a-z0-9_]+)__", "Hello __WO_RD__ Test", $Matches); > >echo $Matches[1]; > > > >produces: > > > >WO_RD > > > >-Rasmus > > > >On Thu, 28 Mar 2002, Sharat Hegde wrote: > > > > > Hello, > > > > > > I am still having problems with the regular expressions. Looks like > >there > > > has been a change in the way they are handled between PHP3 and PHP4, > >since > > > the code worked with PHP3 !! > > > > > > I need to search for all words having alphanumberic characters as well > >as _ > > > (underscore) which are prefixed and suffixed with __ (2 underscores). > > > > > > The regular expression I am using is > > > eregi("__([a-z0-9_]+)__", "Hello __WO_RD__ Test", $Matches) > > > > > > I am expecting the above code to return __WO_RD__ as the match, but it > >does > > > not seem to work. Can someone help out. > > > > > > With Regards, > > > Sharat > > > > > > > > > _________________________________________________________________ > > > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php