My users sometimes enter characters that look like an apostrophe ( ' ) instead of an apostrophe ( ' ), which causes some database problems.
I tried replacing them with gsub as follows:
result.gsub(/\'/, "'") result.gsub(/'/, "'")
None of these options work - getting an error:
syntax error, unexpected $end, expecting ')' return result.gsub(/\'/, "'").gsub("'", "'") ^
Are they reserved by Ruby? How to replace them?
source share