GetPhone
Description
Description
Extracts a telephone number from the input. Designed to handle US numbers, international numbers with country prefixes, and extension numbers.
Syntax
Syntax
Function GetPhone( input, format, pos )
input - String to be parsed
format Boolean - Would you like your phone number formatted? (default is true)
pos integer (optional, in/out) - search from position (default is 0)
Return value
Return value
This function returns a string.
Sample
'---------- Start ----------
Function Start
Dim str, str2
str = "If you need to extract numbers such as 123-456-7890 use target object GetPhone"
str2 = target.strlib.GetPhone( str )
trg.Message( str2 )
End Function
In this case the input string is parsed for a phone number which is then extracted.
See also