UiPath || Search pattern in Mainframe screen

Hello Team,
I need to find if value1 Y OR N date is present in mainframe screen. Here value 1 has some value , after few spaces Y or N will be there then after few spaces date will be there.

Please help me with regex or how we can achieve this.
Thank you

Hi @rutika.thawle

Try this


This would capture “value1,” “Y” or “N,” and the date separately.

can you share the sample input and expected output


HI @rutika.thawle

I have taken the sample data like below if value1 as some value after that Y OR N After spaces date so this will matches the exactly one for your scenario

Try this regex expression for that


**Note :- it will matches the date having Y OR N then it will give as boolean as output**


1 Like

Hi Praveen , value1 is the string that I will pass in regex also the date. Also there are 11 spaces before Y/N and 3 spaces after Y/N. Shall it be like :
I am sorry I am newbie in regex.


can u give a input clear


Use this Regex



date we dont need to mention u can put value2 instead .

I have mainframe screen scraped in string having multiple rows with records like
X1 Y 11/12/2023 CC1 DD EE
X2 N 11/12/2023 CC2 DD EE
X3 Y 02/12/2023 CC3 DD EE
X4 N 02/12/2023 CC4 DD EE
X5 Y 11/12/2023 CC5 DD EE

So this i have in string variable mainframescreen now .

variable value1 = X1
variable value2 = 11/12/2023
Now i want to check whether this mainframescreen string has value like :
value1 Y value2

here u can see there is space between value1 and Y . also there is space between Y and value2.
Please share the regex to match.

Hi @rutika.thawle

Try this



for example your variable having the value 1 = X1,X2…SO on etc
and str_date = 11/12/2023 …so on , so it will match for your pattern like Y OR N

You can try this regex expression it will work for you and it will match the spaces between there are 11 spaces before Y/N and 3 spaces after Y/N. it will match


for reference you can see the output : -