Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

REPLACE 3

Posted on 2004-09-23
2
Medium Priority
?
214 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

610 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