FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » how to change old ereg?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: how to change old ereg? [message #181945 is a reply to message #181940] Wed, 26 June 2013 19:34 Go to previous messageGo to previous message
Gregor Kofler is currently offline  Gregor Kofler
Messages: 69
Registered: September 2010
Karma:
Member
Am 26.06.2013 13:57, Tony Mountifield meinte:

[snip]

> That's because you have an unescaped / within your regex, so it sees
> /^M?(([0-9]?)[ ]?([0-9])(/ followed by a ? as a regex modifier.
>
> Try this:
>
> } elseif (preg_match('/^M?(([0-9]?)[ ]?([0-9])(\/?)([0-9]*))SM$/',

Or use an (in this case) "unambigious" delimiter like '~', '#', etc.

http://php.net/manual/en/regexp.reference.delimiters.php


Gregor
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FORMS, validating mail was sent
Next Topic: $referrer = $_SERVER['HTTP_REFERER'] echo
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 22:09:26 GMT 2024

Total time taken to generate the page: 0.06684 seconds