polilop said:
I have a very long string in which i need to remove new lines (\\r\\n)
etc.Managed to remove new lines but in my output i still get '^L',
which kind of escape character is this?Is it EOF? how to remove it?Thanks
It's a "eop" (end of page / formfeed) character, that (back in the
old days(*) of plaintext printers) triggered the printer to skip to next
page, and was the reason why accidentally printing a binary file caused
so many sheets of paper to be wasted.
In newsgroups, this character is generally used to hide spoilers:
some usenet-clients hide the text after that char until some
key is pressed. I just saw that happen for your posting. (I now
replaced it with it's ^-char notation, to prevent my answer to
be also hidden.)
The hexcode of that char is 0x0C, and it's backslash-combo
is \f (for: formfeed), so to embed it into a regexp-string
you could use "...\f..." or "...\u000C..."
(*): these days aren't all that old: for PCL printers, this
character still has its meaning.