@ infront of a String

Hello,

im trying to use the RegEx Match activity on a string that i got from OCR.
It is not working and i figured out, that there is an “@” infront of the String. When i create a new String with the same information (without the “@”) by myself, its working perfectly. Is there any way of removing this @? I allready tried cutting out the first character or line, but the “@” allways remains.

Kind regards,
Paul

Hi @Paul_Broo,

Welcome to the UiPath Community!

Try String.Var = StringVar.Replace("@","")

I allready tried this. The @ at the start remains untouched.
image

@ is not part of the string value:

please share a screenshot from the string var value (used for the regex), the pattern and the expected out put with us. Thanks

1 Like


So this is the Text i copy pasted from the OCR extract. In the RegEx Builder, its working fine, but if i run the process its not matching anything. If i run it on the exact same string without the @, its working perfectly fine.

image
The string is extracted like this. (I had to blur some informations)

As mentioned and demonstrated @ is not part of the string value
check that multiline is enabled and keep in mind. The Windows Linebreak is composed by \r\n. In the preview only \n will occur.

Check that multiline is enabled Regex Options and check for following pattern:
(?<=zum\r?\n).*?\d+

Thank you very much!

The “\r?” solved the problem. It seems i dont have to enable multiline to make it work.
But how is it working on a String without the “@” infront?

in the pdf text the linebreaks are \r\n with \r?\n we made it defensive. More clear.
Es hat mit dem @ nichts zu tun

1 Like

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