Regex recursive capture into single group
Advertisements This is a really simple task, I have a string: s/test/foo/bar I want one group to contain s/test/ and the rest to be contained in another group: group 1: s/test group 2: foo/bar My expression is: (/s/test/)([a-z]+/) This will do half of the job but only captures ‘foo’ in group 2. How do I… Read More Regex recursive capture into single group