Click here to Skip to main content
15,886,019 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i am using validatoin in that i ve a textbox for mobile Numbers,i want to enter user to enter multiple 10 digit mobile no with commas like-9875456321,987456321 and so on




so plz give solution for regular expression




thank You
regards
manohar
Posted
Comments
Kenneth Haugland 10-Jul-12 8:59am    
You should definetly take a look at this if you want to use regular expressions:
http://www.codeproject.com/Articles/3669/Expresso-A-Tool-for-Building-and-Testing-Regular-E

try this:

C#
@"^\d{10}$"
 
Share this answer
 
Comments
Manohar_manu 10-Jul-12 9:01am    
it is working for enter one value,,but i want to enter multiple mobile no like 987456321,9874563214 like that.
Sandeep Mewara 13-Jul-12 2:23am    
Good direction provided.. 5!
Manas Bhardwaj 13-Jul-12 3:42am    
thx!
Its been a while since I tried to do anything with regular expressions, but:
if you do something like (\d{10}((?=[,])|$))+

Im assuming that all the numbers have exactly 10 digits, and that they are separated by the sign "," or hit the end of the line.

Regards Kenneth
 
Share this answer
 

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