11-14-2013, 11:08 PM
thanks for the reply
Those two are close but not quite what i need..
i dont want a list. All i want is the first phone number in selected text
I just want the first 10 digit phone number in the text that i select on web page. (no matter whats at the start or end of phone number)
so start with the first character thats a digit (1234567890)
and end with the 10th digit after the first, removing all non digits in between like "().- spaces"
Example 1:
phone: 800-123-1234x12345
new line with other text
Example 2:
myphone: (800)123-1234 x12
Example 3:
your phone number: 800.123.1234
Example 4:
your phone number: 800 123 1234
what i need to end up with:
string s= "8001231234"
thanks for your help with this
Those two are close but not quite what i need..
i dont want a list. All i want is the first phone number in selected text
I just want the first 10 digit phone number in the text that i select on web page. (no matter whats at the start or end of phone number)
so start with the first character thats a digit (1234567890)
and end with the 10th digit after the first, removing all non digits in between like "().- spaces"
Example 1:
phone: 800-123-1234x12345
new line with other text
Example 2:
myphone: (800)123-1234 x12
Example 3:
your phone number: 800.123.1234
Example 4:
your phone number: 800 123 1234
what i need to end up with:
string s= "8001231234"
thanks for your help with this