Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Long time no posting! I've a regex question!


Matthew1980 - 11:47 am on Mar 2, 2013 (gmt 0)


HI there people,

Crikey, feels like ages since i've posted on here, hope as everyone is having a good time :)

Business:

Simple regex:

^[A-Z]/[A-Z]{2}[0-9]{3}/[0-9]{2}$

This checks for - AP/PD123/13, how can I change this to add an either or type operator in there, sort of like this:-

^[A-Z]/[A-Z]{2}[0-9]{3}/[0-9]({2}|{3})$

I'm sure that this is correct, but it's not reacting to the change.

?

Thanks in advance.

Cheers,
MRb


Thread source:: http://www.webmasterworld.com/php/4550389.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com