Franklin wrote:
> I need to come up with a regex that tests for conformance to the following
> example:
>
> UA-123456-7
>
> To match, the string :
> - must start with "UA-" (upper case only)
> - followed by exactly six unsigned integers (each can be zero through nine)
> - followed by exactly one dash ("-")
> - followed by exactly one integer (which can be zero through nine)
>
> Thanks.
>
That was a much more precise specification that you usually see.
^UA-\d{6}-\d$
--
Göran Andersson
_____
http://www.guffa.com