Grab value after screen scraping into if condition

Hello, im new in UI Path

So, i have a problem where I want to grab response time value after screenscraping
The output of screen scraping is like below :

● AAA252 :
● BBB185 :

I need to grab 252 and 185 to if condition
If AAA and BBB value are below 1000, this will be normal condition
if AAA and BBB value are above 1000, this will be warning condition

Please any suggestion are welcome


Hi @Yoseph_Valentino

Use matches activity and give the regex expression as \d+
and based on the condition
if output count <1000 and output .count>1000

Ashwin S

welcome to uipath community
if the input is in variable named strinput
use a assign activity like this
int_value1 = Convert.Toint32(System.Text.RegularExpressions.Regex.Match(strinput.ToString.Split(Environment.Newline.ToArray())(0).ToString,"(\d)+).ToString)

similarly another assign activity like this
int_value2 = Convert.Toint32(System.Text.RegularExpressions.Regex.Match(strinput.ToString.Split(Environment.Newline.ToArray())(1).ToString,"(\d)+).ToString)

then use a IF CONDITION like this
int_value2 < 1000 and int_value1 < 1000
if true goes for THEN part or goes to ELSE part

Cheers @Yoseph_Valentino


I got an error like this when i input the activity

How to solve this error??

Thank you

1 Like

Got it typo mistake buddy
We need a double quotes next to the Regex expression like this
int_value1 = Convert.Toint32(System.Text.RegularExpressions.Regex.Match(strinput.ToString.Split(Environment.Newline.ToArray())(0).ToString,"(\d)+”).ToString)

similarly another assign activity like this
int_value2 = Convert.Toint32(System.Text.RegularExpressions.Regex.Match(strinput.ToString.Split(Environment.Newline.ToArray())(1).ToString,"(\d)+”).ToString)

Cheers @Yoseph_Valentino