?
Solved

REPLACE 3

Posted on 2004-09-23
2
Medium Priority
?
215 Views
Last Modified: 2010-04-15
Hi Experts,

Need to replace using regex double quotes in string by white spaces.

Thank you.
0
Comment
Question by:fpoyavo
2 Comments
 
LVL 19

Accepted Solution

by:
drichards earned 2000 total points
ID: 12134637
Is this all you're trying to do?  Can be done with Regex or String.Replace:

            string rs1 = s.Replace('"', ' ');
            System.Text.RegularExpressions.Regex rx = new System.Text.RegularExpressions.Regex("\"");
            string rs2 = rx.Replace(s, " ");

where 's' is the source string.
0
 
LVL 7

Expert Comment

by:NipNFriar_Tuck
ID: 12143407
You can also use Regex statically...

so you could do:

string rs2 = System.Text.RegularExpressions.Regex(s, "\"");
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question