Re: Trying to remove "\" from a string

From: Bobby Ryzhy (bryzhy_at_hotmail.com)
Date: 07/07/04


Date: Wed, 07 Jul 2004 14:22:22 -0600

s = s.Replace("\\", "");
double up the escape char.

Bobby Ryzhy
bobby@ name of domain below
http://www.weekendtech.net

On Wed, 7 Jul 2004 20:01:57 GMT, Robert@Rob.com wrote:

>Hello.
>
>I have tried to remove the char "\" from a string that I am building in
>codebehind.
>to be used in a script tag.
>
>I have tried adding (char)34 to the string instead of the escape character,
>as well as @then double quotes.
>when i watch the string in the command window or the watch window it has the
>escape character in the string allways \"
>I have tried to use replace.. but you cant replace a escape character, I
>tryed establishing a char variable as (char)92
>
>My question is how the heck can I build a string without an escape character
>around the quotes ?
>
>Thanks,
>Rob



Relevant Pages

  • Re: Escape character treatment in string library functions
    ... Can I change the escape character used by string libraries?. ... treat '\r' etc special making it difficult to parse even char by ...
    (comp.programming)
  • Re: RegEx and Vb.net /// "Unrecognized escape sequence"
    ... Not that \ is the escape character for regular expressions. ... VB.Net does not use the \ character as an escape character in strings. ... Dim fileName As String ...
    (microsoft.public.dotnet.framework)
  • Re: Unrecognized escape sequences in string literals
    ... If you don't know what your string literals are, ... Adding escape codes into the string literal doesn't change this ... extra effort required to defeat the compiler (forcing the programmer to ... And if you saw that in Python, you'd also know that there are some ...
    (comp.lang.python)
  • Re: Unrecognized escape sequences in string literals
    ... need worry that I've misinterpreted what a string literal means. ... You can't expect the compiler to save you from ... Adding escape codes into the string literal doesn't ... (This behavior is useful when debugging: if an escape sequence is ...
    (comp.lang.python)
  • Re: problems with opening files due to files path
    ... GUI or it is a console app. ... of what an escape character and escape sequence is. ... character) inside a string specially, it makes the character after the ...
    (comp.lang.python)