For example, I have a target string like:
str='Every "red","white","blue" flower is $7.'
If I run /Every ("(.+)",?)+ flower is \$(.+)/.exec(str)
, I will get "red","white","blue"
as a whole output element, but what I want is ["red,"white","blue"]
.
Is there a way to do this, or I can only use split
?
Thanks!