Hi Tamas,

I actually want a behaviour such that the output string has "$LBP" rather 
than "\$LBP" so that when the string is read it returns the value of LBP in 
the string e.g.:

julia> LBP=30

30


julia> string ="LBP =$LBP"

"LBP =30"




On Sunday, April 26, 2015 at 1:44:05 PM UTC+1, Tamas Papp wrote:
>
> 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] <javascript:>> 
> 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