ruby - gsub for removing brackets and \ from string -


i have issues using gsub remove [] , \" string. here string:

"[\"this word ect\", \"char2\", \"another grooup\", \"char4\"]" 

i want returned value be:

"this word ect, char2, grooup, char4" 

can point me in right direction?

just out of curiosity:

str = '["this word ect", "char2", "another grooup", "char4"]' require 'json' json.parse(str).join(', ') #⇒ "this word ect, char2, grooup, char4" 

Comments

Popular posts from this blog

java - Incorrect order of records in M-M relationship in hibernate -

command line - Use qwinsta in PowerShell ISE -

php - I want to create a website for polls/survey like this http://www.poll-maker.com/ -