Removing Parenthesis From A String

Simcoder

Centurion
Joined
Apr 18, 2003
Messages
125
Location
South Carolina
This probably has to be one of the most annoying yet simple problems I have ever ran across. How do I remove parenthesis from a string in code such as

Visual Basic:
str1 = str2.Text.Replace(" '"' ", "");

That does not work because the parenthesis is a keychar.

Thanks In Advance.

-=Simcoder=-
 
Guessing it is C# (well, there is no ; in vb ;) ), you can also use the \ to indicate the use of the " character. So it would be something like:
[CS]
str1 = str2.Text.Replace(" \" ", "");
[/CS]
The \ indicates an escape sequence allows you to specify other characters as well (like linefeed \n, return \r, tab \t, and some more stuff).
 
I was pretty confused until I realized that you guys were all talking about quotes (the thread's title is removing parentheses).
 
Back
Top