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

What are the available formats for the phone numbers?

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

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:


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
and i have never use Regex Function (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: