• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

extraction of email and contact number (fixed and mobile) from a list of urls

Good morning.
I found the shihin code at this link for email extraction and contact telephone numbers:

Could you help me find the right regex expression for both extrapolating landline and mobile phone numbers.
For this I have inserted all the fixed and mobile prefixes in the second sheet of the file that I have attached

Then it is possible to modify the shihin code so that the extraction can take place from a list of urls contained in the column a of the sheet and can provide for the possibility of extracting the email, landline and mobile phone taking into account that sometimes there may be multiple emails or fixed and mobile numbers (italian numbers)?



At this link (https://stackoverflow.com/questions/35794734/italian-phone-10-digit-number-regex-issue ) I found the ways in which a telephone number can appear.

1) whole without international prefix;
2) with international prefix (+39);
3) the variants between the two with space after the prefix or the international prefix or prefix in round brackets.

I don't know if there can be others.



Thank you
 

Attachments

Last edited:
good morning
I put this regex expression in the shihin code:
^ (\ ((00 | \ +) 39 \) | (00 | \ +) 39)? (38 [890] | 34 [4-90] | 36 [680] | 33 [13-90] | 32 [ 89] | 35 [01] | 37 [019]) (\ s? \ d {3} \ s? \ d {3,4} | \ d {6,7}) $

I found it here (the last post):

I thought it was the wrong expression, however, I thought of using the link indicated by chihiro:
inserting all the links of all the mobile numbers I own and I noticed that the expression regex has no problems.

For this reason I thought that there will be some errors in the macro code for the extraction of telephone numbers because the emails are actually extrapolated.

Is there someone who can help me?

Thank you
 
good evening

In trying to identify the regex expression I noticed that not all possible cases are possible with the eltima expression present at this link:


the expression I changed is this:

^ (\ ((00 | \ +) 39 \) | (00 | \ +) 39)? (32 [2-47-90] | 33 [13-90] | 34 [1-90] | 35 [01 -35] | 36 [1-3680] | 37 [1-90] | 38 [2-5890] | 39 [1-3890] |) (\ s? \ D {3} \ s? \ D {3, 4} | \ d {6,7}) $

The possible combinations of mobile telephone numbers using 320 as a simplified example are these:
1) international prefix and its combinations:
39
+39
0039
(+39)
(0039)
2) number of digits that make up the part following the normal prefix (not including the international prefix):
6/7
3) Possibility of spaces between the digits.

You get:

320123456
3201234567
39320123456
393201234567
39 320123456
39 320 123456
39 320 123 456
39 320 123456
39 320 123 456
+39320123456
+393201234567
+39 320123456
+39 320 123456
+39 320 123 456
+39 320 123456
+39 320 123 456
0039320123456
00393201234567
0039 320123456
0039 320 123456
0039 320 123 456
0039 320 123456
0039 320 123 456
(+39) 320123456
(+39) 3201234567
(+39) 320123456
(+39) 320 123456
(+39) 320 123 456
(+39) 320 123456
(+39) 320 123 456
(0039) 320123456
(0039) 3201234567
(0039) 320123456
(0039) 320 123456
(0039) 320 123 456
(0039) 320 123456
(0039) 320 123 456

By entering the expression and numbers here:

not all combinations are highlighted.
Why is it that if in the last post of stackoverflow it is indicated that spaces are excluded, the regex expression does not apply to all numbers?

Thank you
 
good morning
I realized that it was necessary to remove the initial "^" and final "$"
i tried the macro and it didn't extract the numbers in this site:


I have seen the web code of the page and have noticed that it indicates the names by the telephone numbers.
Could you tell me how to change the regex expression for these cases?
Thank you
 
Top