Hi I have a string of texts which include a phone number in many different formats, I need to be able to extract just the phone number.
Eg: "Hi my name is marc and my phone number is 03-123456 and i would like 2 bottles of water 0.5L"
possible phone formats:
- All phone numbers begin with area code either 03 or 70 or 71 or 76 (no other option)
- all phone numbers are 6 digits after the area code
- Different msgs have different formats such as 03-123456 or 03123456 or 03 123 456 or 03 123456 or 03/123456 (you get the idea)
I am able to find the index using find function in python by looking for (03 or 70 or 76 or 71) but I am not able to find the index of the last number.
number_start = message.find('03' or '70' or '76' or '71')
Any ideas?