Link to home
Start Free TrialLog in
Avatar of RayT
RayTFlag for United States of America

asked on

Using Regular Expression to convert Double-Quote

Can anyone provide an example of how to remove double-quotes from a string using Regular Expressions?
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry Kaufmed, I don't mean to pretend to know more than you about VB.NET, but don't you want "\"" as your regex string?
Avatar of RayT

ASKER

Kaufmed,

Actually I wanted to know how to do the following:

Replace this
" & vbLf & "

With this
Nothing

Can this be done using regular expressions???

That's why I thought it would be nicer with regular expressions.  And it give me a chance to learn regular expressions.

Thanks
@bigdogdman

You're confusing C# and VB.NET. In VB, you escape a quote by using another double-quote.

@rgturner

Please clarify: When you say, "" & vbLf & "", do you mean you have a string like this:

Dim someString As String = """ & vbLf & """

Open in new window


...or like this:

Dim someString As String = "someText" & _
                           vbLf & _
                           "some more text"

Open in new window

Avatar of RayT

ASKER

Thanks!