ruby adding single \ to escape # instead of double backslash
for example, the # in string sd@# is preceded with single \ like this sd@\# automatically. I think it should add \\ (double backslash) to escape #.
Is it a bug in ruby syntax? if not is there a way to escape it manually
Please help
You can use a single
\to escape#. Also, there is no need for escaping#in strings. Bothmystring#andmystring\#will give outputmystring#