For the given string example: <a><b><c><d><e><f><g>
I’d like to write an expression that will repeatedly match the first 5 <(?)> tokens and put them in $1, $2, $3, $4 and $5.
The naive implementation would be of course: /<(?)><(?)><(?)><(?)><(?)>/
But back in the day I remember doing something like /(<(?)>:5)/ instead.
I’m having a hard time finding this syntax.
Can anyone help?
Thanks.
Will give all the matches. It’s just a matter of getting a slice: