I want to extract all phone numbers from a text including all phone number formats. I mean the code must extract : 01119799611 00201119799611 0111 97 99 611 002-01119799611 (002)01119799611 0111.97.99.611
@NogDogMar 11.2013 — #Probably you'd use preg_match_all(), but first you'll need to define all possible patterns you might want to search for, and convert them into regular expressions -- or possibly one regexp if you're lucky (or good).
@darroosh2authorMar 11.2013 — #I know that it can be done using regular expressions . But i'm pretty new to regex , So I need help creating its regex.
I think the searched value must be : zero or more occurances of ( any number or dash or space or () or plus ) then must be : ( 01 ) then more than 9 occurances of (any number or dash or space ).
@SebastianGrayNov 06.2020 — #@darroosh2#1254633 dude, there are a lot of services on the Internet where you can extract numbers from text and information about these numbers
@SebastianGrayNov 08.2020 — #I know a good generator that can use regular expressions to select all phone numbers from a large text. But there are a lot of them on the Internet now, so you just need to search correctly. Everything is quite simple: you enter your text in the text block, and the program at the bottom will write you all the phone numbers that are written in this text. In General, I do not like this whole topic concerning phone numbers because in our time there are so many bad people who want to profit from the problems of bad people. In General, there are many scenarios, you can get a call and say that your card is blocked, yell and call and throw the phone. You will have to call back to resolve all these issues but you will be transferred to a paid line .Usually, money is withdrawn from your mobile account after you get through. And it is difficult to dispute – they themselves dialed this number from their phone. I fell for that trick, too. I got a call and got pissed off, and then hung up, and since I was furious, I decided to call back and deal with everything that was going on. As a result, I was charged $245. I decided to check the number in the spam database [256 510 2225](https://calldetective.net/numbers/256-510-2225/) and was not even surprised when I found it in the spam database and my guesses were confirmed.