Hello guys Please I would love to extract the highlighted address from the string . The address is always going to start the string and end with a zip code as seen
thanks in advance
Hello guys Please I would love to extract the highlighted address from the string . The address is always going to start the string and end with a zip code as seen
HI,
How about the following expression?
System.Text.RegularExpressions.Regex.Match(yourString,"^.*?\b\d{5}\b").Value
This assumes zip code is 5 digit.
OR, if “Phone:” always follows Address, the following might be better.
System.Text.RegularExpressions.Regex.Match(yourString,"^.*?(?=Phone:)").Value
Regards,
How about this Regex expression
System.Text.RegularExpressions.Regex.Match(yourString,".*(?=\sPhone:)").Value
You can also try with Split expression
Split(YpourString,"Phone")(0)
Regards
Gokul
Hello @MasterOfLogic ,
Try this Regex
System.Text.RegularExpressions.Regex.Match(yourString,".*(?=\sPhone:)").Tostring.Trim
System.Text.RegularExpressions.Regex.Match(YourString,".*\D\s\d{4,8}").Tostring.Trim
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.