Open Laboratory for Technocrats

Grab the developer role, learn concepts & prepare with senior software engineers to get solutions for problems in a software job. Coding and Programming Solutions crafted for you.

Regex to find Mobile Numbers


Its sometimes quite easy to get the phone numbers or mobile numbers from the data depending upon the language you are using.But its always good to go with the regex as it will work on the most of the programming languages.

RegEx can be called as a Language which is useful in various cases where the normalization needs to be done.

Today I figured out the way to grab the Mobile number from the string as it was great to explore the RegEx which has provided various kind of expression to go on.
 The expression on which I stopped that gives me more than others is as:

((\+*)((0[ -]+)*|(91 )*)(\d{12}+|\d{10}+))|\d{5}([- ]*)\d{6}


This regular expression I have used in various places to fetch the mobile number or land-line number from the string or html page code.

Please comment to add more useful regex related to mobile number or landline number search.

Keep Learning :)

Top #3 Articles