Let's say I have a string:
asd;;%$@#!G'{}[]
Now I want to escape special symbols:
;&|><*?`$(){}[]!#
So, the output will be something like:
asd\;\;%\$@\#\!G\'\{\}\[\]
How can I achieve this using gsub/sub in Ruby?
Let's say I have a string:
asd;;%$@#!G'{}[]
Now I want to escape special symbols:
;&|><*?`$(){}[]!#
So, the output will be something like:
asd\;\;%\$@\#\!G\'\{\}\[\]
How can I achieve this using gsub/sub in Ruby?