Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search and replace strings in file

Status
Not open for further replies.

scimatic

Technical User
Aug 30, 2004
19
US
How would I write a program that could search and replace strings in a text file. The string I want to search for is "," and replace with a ~

The problem is that I want to replace the comma and the quotes with the tilda in a file and i get errors with having double quoted strings, like "","" because I want to search and replace 3 characters which are quote comma quote.
 
Your search string should use escape sequences to signify quotes like this:

\",\"

Example:
Code:
text.find("\",\"");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top