Extract alphanumeric from a string

Hi,

I have a string “The old town 52f down street” in which I need to extract “52f” from the string.

Input - can have the combination of numeric (23,45,) and alphanumeric (23s,44D)

Could you pls help me to extract the data from the string

Examples 1
Input - " 53 The Village valley "
Output - 53

Example 2
Input - “Subway 42s North Street”
Output - 42s

Hi @Priyanga_Karnan

You can extract it using the regular expression (Matches Activity)

image

\b\d+[A-Za-z]?\b

Usage of conditional \w class
grafik

[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum

Kindly note: depending on the culture / locals check if only letters / digits will occur and chars like 1st. (first - dot) a “/”… can be excluded from pattern

Hey @Priyanga_Karnan

Welcome back to the forums :blush:

Take a look here at this pattern.

Here is a link to preview and test.

Cheers

Steve