Click here to Skip to main content
15,041,393 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

Need a Regular expression for validating the following scenario- am using a Text Area-

- User can enter a phone number/s which should be of length 10 starting with 0
- each phone number must be seperated by comma
- maximum characters allowed in the textarea is 100

Many Thanks
Posted
Updated 12-Dec-12 3:24am
v2

1 solution

What about this:
^0\d{9}(,0\d{9}){0,9}$
   
Comments
hari592 12-Dec-12 9:32am
   
Zoltan , No luck
Zoltán Zörgő 12-Dec-12 12:44pm
   
Than you probably have formulated your requirement in the wrong way. This regexp will accept string like this:
0123456789
0123456789,0123456789
...
in English: a series of one to ten numbers of ten digits starting with zero, separated with comma. This is exactly what you have written.
It would be easier if you would give some acceptable examples.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900