Solved

REPLACE 3

Posted on 2004-09-23
2
206 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 500 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now