I need to convert string like \"/[\\w\\s]+/\" to regular expression.
\"/[\\w\\s]+/\" => /[\\w\\s]+/
I tried using different Regexp
Regexp
Looks like here you need the initial string to be in single quotes (refer this page)
>> str = '[\w\s]+' => "[\\w\\s]+" >> Regexp.new str => /[\w\s]+/