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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gsub escape character problem 1

Status
Not open for further replies.

paulobrads

Programmer
Jul 13, 2006
28
GB

I want to substitute all instances of " symbol in a string with /" symbol, literally.

Code:
gsub(/\"/,"\\\"", $i);

Gives me \\" for each " but I can't find a way of just \"

Any ideas?
Cheers.
 
Afraid not, that slash is the wrong way round, I want to actually insert an escape character - \
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top