Google+

Saturday, May 28, 2011

Regular Expression For Mobile validation



         Hi , regular expression is a text matching mechanism . suppose you want to validate whether given input to textbox is mobile number or not? , then regular expression is good way.


         To validate mobile like(+9548508412 or 9548508412 or  95485084121 ) , means if you want that mobile number should be at least 10 digit long and  '+' is optional ,  you can use these regular expression :


\+?\d{10,}





Note:-Please comment and reply me.

0 comments:

Post a Comment