More than one patterns to be captured?

What if the string is “row row row your your your boat boat boat” ?
I want to capture all the row(s) in one group, your(s) in next and boat(s) in the last group.

Challenge: Reuse Patterns Using Capture Groups

Link to the challenge:

something like this? regex101: build, test, and debug regex

1 Like