O
O
Oleg Likhachev2021-02-28 11:52:23
Regular Expressions
Oleg Likhachev, 2021-02-28 11:52:23

How to write a regular expression (Nodepad++)?

It is necessary to pull out phone numbers from the mass of code, text, etc. Numbers can be of the following types:

+7 000 000-00-00
+7 (000) 000-00-00
8 000 000-00-00
70000000000
8000 000 00 00


Etc. Perhaps these are not all options.

I tried it with Notepad++. I found an example of a regular expression ((8|\+7)[\- ]?)?(\(?\d{3}\)?[\- ]?)?[\d\- ]{7,10}on the Internet, but for some reason it does not find it.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question