Maybe something like

julia> s = "my \\ escaped \\\$ \$ string"
"my \\ escaped \\\$ \$ string"

julia> replace(s, "\\\$", "\$")
"my \\ escaped \$ \$ string"

Best,

Tamas

PS.: Incidentally, is there a way to enter strings with $ without
escaping them? Ie something like a non-standard string literal that just
ignores the $'s.

On Sun, Apr 26 2015, will ship <[email protected]> wrote:

> Hi
>
> I am reading in a text file with special characters e.g. : " Blah is $LBP"
> when I read it in to a variable the "$" gets replaced with "\$". But I
> actually want the $ non-escaped so that when handling the string variable
> it prints the $LBP value.
>
> Is there anyway of doing this, our just to remove the "\" in the string
> without removing the "$" as well?
>
> Thanks in advance.
>
> Will

Reply via email to