Create a PHP function with regex parser for phone numbers to convert into links
$10-30 USD
Paid on delivery
Hi,
I want to have a PHP function that will parse a text searching for phone number patterns. Need to keep a format and create a a link. Here are some examples of what I want:
1-300-400-600 => <a href="[url removed, login to view]">1-300-400-600</a>
020 7378 4482 => <a href="[url removed, login to view]">020 7378 4482</a>
(020) 7378 4482 => <a href="[url removed, login to view]">(020) 7378 4482</a>
(020)-7378-4482 => <a href="[url removed, login to view]">(020)-7378-4482</a>
+0034606890789 => +<a href="[url removed, login to view]">0034606890789</a>
976 789 345 => <a href="[url removed, login to view]">976 789 345</a>
976-789-345 => <a href="[url removed, login to view]">976-789-345</a>
91 37 89 345 => <a href="[url removed, login to view]">91 37 89 345</a>
Only for numbers bigger than 5 digits and smaller than 14 digits. If there is a carry return, end the number. So this would be two different numbers:
1-400-600-700
0001115
As:
<a href="[url removed, login to view]">1-300-400-600</a>
<a href="[url removed, login to view]">0001115</a>
Pretty much the same for any phone number format. The href needs to be always the number without spaces and symbols/or and the anchor must be the same as given.
The function will get as a parameter the text to parse, and will return the same text with the numbers replaces for links.
Also, the tool should get a phone number as a parameter and if this case is found in the text it won't be converted to link.
Project ID: #5691606
About the project
9 freelancers are bidding on average $27 for this job
Hello, I got the idea of that function, but will the input text will contain many phone numbers, or each argument will contain only one phone number per time? Best Regards
hi, I am interested to develop parser to parser phone number as per your given rules. Please see my previous work and let me start the work. Thanks Prakash
I developed the function for you, If you need it I can give you right now. Ready to give you the solution.
Hi pirneo, I hope that you are still looking for someone to do this task, I will be pleased to do it for you; send me a private message when you will be online. Thanks, Sofienesof
Hello sir, i am a 3+ year experienced PHP developer ,if you allow means now itself i can start coding, i am waiting for your reply