Address Phone No

hi i am in uipath
i have a query
i have address which contains phone no and some doesnt
how can i check weather it contains or not
thanks
Arjun

What are the available formats for the phone numbers?

440-836-7702
5053555563
305-420-5637
509-448-2828
it like this

Save that address text into a string variable. Suposse var1 as String type.

Next step is check about if text has the phone number:
var1.contains("-") as I can see, your numbers will always have a “-”

Better than that (in the case of a number wont have “-”) I would check if the string is empty (because i suposse that if there is no number you will have blank space)
var1.Trim<>"" so if there is any value, you will get it as the phone number.

"
Amber Ridder
Ruhnau Clarke
3775 10th St
RIVERSIDE, CA 92501"

as this address doesnt contain phone

Use regex. Simple.

Use the activity “IsMatch”, enter your text in the input field.
In the regex pattern field, put this:

“\d{3}(-?)\d{3}(-?)\d{4}”

Your output will be a boolean value. Check if that’s true or false. If it’s true, your address has a phone number.

any example as i m new so little difficult pls
thanks
and i have never use Regex Function

TestRegexPhoneExistsInAddress.zip (2.2 KB)

Try this @arjun27 and let me know if this resolves your problem.

Thanks Alot of bro
My flow is working properly

You’re most welcome, @arjun27 :+1: