Issue with regex matches

Hi, this regex is working in the regex tester but it’ s not working in uipath.
This is the regex code:
(?<=G Adj for SMTP Usage for Bill ID:\d{4}\s)\d+(?:,?\d{3})*(?:\s?.\d{2})(?=\s-?$)
This are some test text:
G Adj for SMTP Usage for Bill ID:0049 1,845 .97 -
G Adj for SMTP Usage for Bill ID:0049 845.97 -
G Adj for SMTP Usage for Bill ID:0049 845 .97
G Adj for SMTP Usage for Bill ID:0049 845 .97
G Adj for SMTP Usage for Bill ID:0050 1,319 .21 -

Pls help thank you xoxo

1 Like

Please try it is https://regexr.com/.

@sangasangasanga same regex is working in uipath also.

Hi @Vivek_Arunagiri,
I tried like you said however, I am only getting one match. But supposed to get match for all.

You expression is correct. Just remove dollar symbol $. Because it$ represents the last match.

sorry, remove what?

(?<=G Adj for SMTP Usage for Bill ID:\d{4}\s)\d+(?:,?\d{3})*(?:\s?.\d{2})(?=\s-?$)

The dollar symbol $.

Try building regex from this tool. As per my experience this is the only tool whose results work in uipath.

1 Like

Hi @sangasangasanga

I think the ^ and $ signs might be the issue (beginning and end of line). It seems that regex101.com handles those in a different way than Studio.

1 Like