Get OCR Text containing caracter "

Hello,

I would like to compare the result of an OCR, but the text contain the caracters "

So, i’m not able to make any OCRText = "my text with "this" in it"

Is there any special caracter to deal with " as a string and not a text identifier ?

Hi @CG00,
Have you tried to replace the " character to “”"?
In this case, I believe that UIPath will recognize it as a string.

Hello,

Using “”" is not solving the problem, the text """MY_TEXT""" is recognized as variable and not text

I was also thinking about regex to delete the ", but i still can’t use " because UI Path is waiting for the second "

As you can see, it was able to have the " character with the variable that I have created.

In this case, I’m assigning the value "Hello ““My Friend”” " to my variable and I’m also replacing those double quotations marks using the Replace method.

If possible please provide your xaml solution, so we may assist you better. I’ve uploaded my example.
Main.xaml (5.6 KB)

You’re right ! :slight_smile:

I was trying to remove all " and not ""

edit : good luck to remove only 1 " ?

1 Like

@CG00 If you want, you may also remove a specific character or a set of characters from any position using the .Remove method as you can see below:

Also, the following Regex remove the first occurrence of the double quotation mark:
Regex.Replace(msg, “(?<=[1])"“|"”(?=[^""]$)”“, “”"”"“"”", “”)


  1. ^"" ↩︎

1 Like