Click here to Skip to main content
15,914,416 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a string like "'AB'CD''E'".
I want replace ' from the string with empty.
2 single quotes together should not be replaced.
Final string should be "ABCD''E".

Please help
Posted
Updated 21-Nov-13 21:18pm
v3
Comments
Sergey Alexandrovich Kryukov 22-Nov-13 2:40am    
What error? "String.replace" would not even compile. Did you heard that C# is case-sensitive..? :-)
—SA
Nelek 22-Nov-13 4:08am    

Without Knowing Your Code it is impossible to Help
See these Links to know how it works
double-quote-string-replace-in-c-sharp
C# Replace
 
Share this answer
 
A better option is a regular expression. They are found in the System.Text.RegularExpressions namespace. It takes a little to get accustomed to them, but then they are an incredibly valuable tool for string manipulations.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900