I am trying to get a results that shows multiple matches.. but this regex only shows one.
var regexPattern = /(^.+\/)/g;
var string2Test = 'this/should/have/several';
var myMatches = string2Test.match(regexPattern);
console.log(myMatches);
should it not match the three below?
this/
this/should/
this/should/have/
I have been testing it here. https://regex101.com/r/nD7nP6/36