Tuesday, October 26, 2010

validating Phone number

Title : Indian Mobile No

Expression : ^((\+){0,1}91(\s){0,1}(\-){0,1}(\s){0,1}){0,1}9[0-9](\s){0,1}(\-){0,1}(\s){0,1}[1-9]{1}[0-9]{7}$
Description  : This expression is to validate indian mobile nos
Matches : 9836193498, +919836193498 ,9745622222
Non-Matches : +9197456222222 ,8745622222 ,9836193481
__________________________________________________________________________________
Title :Chennai Phone Numbers

Expression
: ^(0)44[\s]{0,1}[\-]{0,1}[\s]{0,1}2[\s]{0,1}[1-9]{1}[0-9]{6}$
Description :This expression will help you to match chennai telephone numbers. chennai bsnl telephone numbers will start from 2.
Matches : 044-26320244 | 04426320244
Non-Matches :044-12345678 | 123-12345678
 ------------------------------------------------------------------------------------------------------------
Refer for more Expressions:
http://regexlib.com/REDetails.aspx?regexp_id=2500
http://www.aspnetquest.com/feed-items/search.aspx?k=expression&p=9
http://www.dotnetspider.com/sites/1050/-Solutions-Tips.aspx

No comments: