substituting apostrphe's

D

Daniel Bretoi

Hi,

I have a bit of a problem, I can't seem to substitute an apostrphe
successfully

a = "'"
a.gsub!(/'/,'\\\'')
puts a

gives me nothing.

two backslash gives me syntax error.

one backslash gives me just the apostrophy.

How do I do this?

db
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,361
Latest member
eitamoro

Latest Threads

Top