Regular Expressions,,,,,,,!

I am using a get text function in UiPath, the item I am trying to identify is a full address, but I only want to extract the state, not the entire address. When I use the function, it tries to grab the entire line of text. Is there a way to parse what text I want from that line?

Help me in ReGex

@priyachennuru789,

If your state have some prefix/suffix or some specific pattern then only RegEx can help here.
Share few sample address to find the pattern and possible regex.

Thanks,
Ashok :slight_smile:

Hi @priyachennuru789

Try this:

If 5 digit zip code always follows state, the following will work.

System.Text.RegularExpressions.Regex.Match(yourString,"\b[A-Z]{2}(?=\W+\d{5}\b)").Value

1 Like

Hi @priyachennuru789

Can you Provide the sample text to extract the required output

Regards

Hi @priyachennuru789

Provide the Input text then we give the Regular expressions to get the required data.

Hope you understand!!

@priyachennuru789,

do you want IN as output?

Thank you
its working,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.