Welcome Guest, Not a member yet? Register   Sign In
Strange regex behaviour
#6

[eluser]sophistry[/eluser]
you could shorten the new regex by taking out a few brackets and a redundant dash... also, definitely use the preg_ functions over ereg_ functions.

from:
Code:
^(([0-1][0-9])|([2][0-3]))[:]([0-5][0-9])$

to:
Code:
^(([01][0-9])|(2[0-3]))\:([0-5][0-9])$


Messages In This Thread
Strange regex behaviour - by El Forum - 10-06-2009, 04:29 AM
Strange regex behaviour - by El Forum - 10-06-2009, 04:42 AM
Strange regex behaviour - by El Forum - 10-06-2009, 05:09 AM
Strange regex behaviour - by El Forum - 10-06-2009, 05:26 AM
Strange regex behaviour - by El Forum - 10-06-2009, 07:57 AM
Strange regex behaviour - by El Forum - 10-06-2009, 01:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB