It's possible to get list of group items from regex object? For example, i have this regex:
var someRegex = /hello\s(.*?), i have (\d+) friends! (?:Bye)/;
I want to be able to get:
['(.*?)', '(\\d+)'];
(Note that i don't want to get the 'Bye' group because it has '?:' mark..)
Thanks!