I have atext file but I want to pick a phone number from that file.
How can I?
is there any regex for this?
How to write regex which gives output as 10 continuous digits (which will be phone number!)?
Other things like what if +91 is addedd and all things will be considered later If anyone get its answer.
Help!!!

10 digits, with a word boundary:

/\b\d{10}\b/

The above with optional +91, start boundary won't work:

/(\+91)?\d{10}\b/
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.