Re: Regex Help
- From: "Alexey Smirnov" <alexey.smirnov@xxxxxxxxx>
- Date: 1 Mar 2007 07:47:27 -0800
On Mar 1, 4:29 pm, "G" <g...@xxxxxxxxxx> wrote:
Hello,
I have a REGEX validator which checks for DIGITS ONLY, 10 or 11 digits in
length. The pattern is:#
^\d{10,11}$
I would like to enhance this pattern so in addition to only digits, and
string must be 10 or 11 characters in length, - I would like the first
character to be a 0, and the second character must NEVER be a 0.
Matches:
0100000000
01234567890
0101010101
Non Matches:
1000000000
0010000000
1010101010
Any regex pro's here able to assist?
Kind Regards,
Gary.
^0(?!0)\d{8,9}$
.
- Follow-Ups:
- Re: Regex Help
- From: Göran Andersson
- Re: Regex Help
- Prev by Date: Newbie needing help with a simple ASP.NET <table> problem...!
- Next by Date: Re: Newbie needing help with a simple ASP.NET <table> problem...!
- Previous by thread: Newbie needing help with a simple ASP.NET <table> problem...!
- Next by thread: Re: Regex Help
- Index(es):
Relevant Pages
|