What is the best way to get quoted words 开发者_开发技巧/ phrases out of the text?
This my attempt does not work properly:
text.scan(/\"([^"]+)/)
I think you want:
text.scan(/"([^"]*)"/)
It works in Rubular.
What is the best way to get quoted words 开发者_开发技巧/ phrases out of the text?
This my attempt does not work properly:
text.scan(/\"([^"]+)/)
I think you want:
text.scan(/"([^"]*)"/)
It works in Rubular.
精彩评论