Remove/Delete last character from GET OCR TEXT

Hello,
I have some problem when I take value from one application.
Always when I take the value end of the string is “]”
For example:
407.48]
12.00]
5.24]

For some strange reason this application always give me at the end “]”
There is no other way to use other activity, so I need to use Regular Expression to delete/remove last character “]”.

I do something like replaceAll(“.$”, “”) but this is not working for me.

Thanks in advance.

Hi
This expression would help you resolve this
yourvariable.ToString.Replace(“]”,“”)
Cheers @Veselin_Ganchev

1 Like

You could also use TrimEnd() to solve this. It trims the specified character at the end of the string.
yourvariable.TrimEnd(new char(){"]"c})

1 Like

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