Test Text in RegEx Builder show that regex works, but nothing in output

Hi,

I use Get OCR to get data from a website (I have tried all other things, but the web site is not cooperative at all, so this is the only way to get the info).
If I use Write Line I get one kind of output and if I double click it I get the Message Details output.

I want to get the data between the word of Utbetalare and Summa. Can be one time or several.

I tried to paste in the Message Details format info to the RegEx Builder Test Text, and to my understanding I get a hit as it gets yellow. (I get info from the first Utbetalare, and I would like the second, but that is for another day.)

But when I try to use the result (via for each) I get nothing. Why does the test get a hit, but when I run the robot, I get nothing? Anyone have any ideas?


Kind regards,
Anna

Hi @ahaegglund

Can you share the input and expected output for both the scenarios.

Regards

there a some doubts if maybe sample data and real data are diverged

(especially the \r\n representation of Line Breaks)

But we can see:
utbetalare and Summa are not in the same lines

the regex dot (.) is exluding \n
grafik

instead of dot you can rewrite to:
Utbetalare[\s\S]+?Summa

1 Like

Hi @ahaegglund

If you want to extract the words between
You can give a try with the below Regex expression.

(?<=Utbetalare)[\s\S]*?(?=Summa)

Hope it helps!!

Thank you so much, this did the trick!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.