How to remove {ENTER} character from a string variable


#1

Hi,

I have a string variable where I store the text I get from the XPath refering to for the body of an email in gmail (in firefox).
As email bodies contain the {ENTER} character, I want to remove it from the variable, as I use it as input for an Excel sheet and it breaks the row when it meet this character .

Any ideas?

Thanks,
Dimitrios


#2

Hi @dimitrios_nt
Have you tried the text action “replace text”? Not sure if it works for the ENTER character but it’s worth a try. Replace that character by SPACE for example.


#3

Hi Tim,
Thanks for your reply. I have tried the ‘Replace Text’ action, but it does not seem to work with special characters, but only with plain text.
I have tried this with putting ENTER, {ENTER}, CR+LF, etc, but it won’t work.


#4

You can use the Clipboard action or Split String action to break your String to a List.


#5

Hi
I just ran into a similar case: OCR scanning a text string the resulting variable includes an “ENTER” (CR) like this:

Image to scan:
image

Result in Word showing non-printable characters:
image

I need to somehow remove the first “ENTER” in this string. The scanning of these strings works fine in dozens of other strings that I scan from same documents. No “artificial” ENTER comes up. Only in this example it fails.

Any ideas?
Thanks!
Tim