Regex in Blue Prism

Sergey

New Member
Hello guys,

i'm using Utility - Strings (Extended) VBO with Regex V2 action (It came with the example process of how to parse text at the Blue Prism digitalexchange - really useful thing). It works just fine and way better then the standard one from Utility - Strings. However, the following expression doesn't work for me: ((OP 20.*)\s*.*\n*.*4698 003 0015.*\n*.*\n*OP.) I wrote it and tested it here - works perfect there and gives me exactly one match. But when I insert it in bp - no match. Any ideas why?

View attachment 1552499394495.png

thank you!
 

Sergey

New Member
Solved myself.

First thing you want to do is to delete all NewLine() from input text with simple Replace(NewLine(), ""). Then just this regex: "(OP \d{4}\/\d{2,3}\..{2}3).*(?:4698 003 0015).*(OP 2019\/51.IZ4)" and voila :)

Seems that there is an issue when using regex in BP when there are newlines.
 

LEANBE

New Member
I just came across this issue today.
I made it work without sacrificing formating in my text by replacing NewLine() with Chr(10) (Line feed).
I did try Chr(13) (Carriage Return) first, but this was not recognised in the \n, while Chr(10) was.
 
Last edited:
Top