I have this string:
string_to_replace = 'if [ "${USER_CONFIG}" != "" ] ; then'
I want to get:
'Sample Only!!!!!'
I am doing:
string_to_replace.sub(/if [ "${USER_CONFIG}" != "" ] ; then/, 'Sample Only!!!!!')
But I do not get the desired result.
Is there a way to escape all regex characters at once in this string?