How to use regular expressions in Selectors

studio

#1

I have one requirement to read a specific line in the PDF’s.
I have to read a an entire line from pdf which can have any of these words as unique words : “sszesen” , “Total Amount” , “Gesamtsumme” , “PAID TO NOTIFIED BANK”. So I used screen scrapping to extract the entire line by using those words. But while selecting the selectors, I tried to make it dynamic by using regular expression. It is throwing me error. Please help me how use regular expressions in selectors to check any of these words appears in the line which we have to extract.

So when I used screen scrapping, Under selectors I got the value as below :
“wnd cls=‘AVL_AVView’ title=‘AVPageView’ /”
"ctrl name=‘sszesen’ role=‘text’ /"
So I need to make the selectors as dynamic and develop such a way that BOT should check for any of those words mentioned above and fetch the data from PDF using screen scrapping. It is working for individual words in selectors. I have to give multiple words with OR condition saying if anyone matches it should fetch the data.

I used the below regular expression : ^.\b(sszesen |Total Amount|Gesamtsumme|PAID TO NOTIFIED BANK)\b.$

Please help me on this as I am stuck and unable to continue.
Thanks in advance.Your help is much appreciated.


#2

You don’t want to use For Each Word from list(pass Variable build selector) > Element Exists > Fetch Data (Click) ?


#3

Hey can you see if you can help me out with my post (OCR Loop with try catch)


#4

Good question, I have not found the question yet. If anyone knows please, let us know.