How can we use regular expressions within selectors in uipath? (Except the wildcards)

robot
activities
studio

#1

How can we use regular expressions within selectors in Uipath? This does not include the wildcards.


#2

how are planning to create regular expressions without wildcards…?


#3

@Pranav_Nikam

As I understand, you can use any code that will return a specific string.

This means that you can construct your select with a variable like this:
"<webctrl aaname='"+System.Text.RegularExpressions.Regex.Match("Name 123","\w+").ToString+"' tag='A' />"

This would return the following selector:
"<webctrl aaname='Name' tag='A' />"


#4

As of now there are only 2 wildcards. But regular expression has many symbols and types. So I am asking how can we use those in selectors?

Suppose we only want to go for numerical string like [0-9]*. So how an we do the same within selectors?


#5

Indeed, for more advanced construction you can use custom premade variables that you include in your selectors. For simple variations the two available wildcards should be enough.