[ad_1]
There’s probably a better way to do this using regexes, but here’s what I came up with:
a.split(/[^(]*\(([^)]+)\)[^(]*/).reject(&:empty?)
0
[ad_2]
solved Get array of matching strings
[ad_1]
There’s probably a better way to do this using regexes, but here’s what I came up with:
a.split(/[^(]*\(([^)]+)\)[^(]*/).reject(&:empty?)
0
[ad_2]
solved Get array of matching strings