in reply to regex (between two words)
The first can match the start between AAA and the first CCC.
Then you loop over the remaining and push the join with the last match into an array.
Maybe easier to maintain than a complicated regex.
See also
perlretut#Using-regular-expressions-in-Perl
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex (between two words)
by LanX (Saint) on Feb 09, 2020 at 22:01 UTC | |
by LanX (Saint) on Feb 09, 2020 at 22:13 UTC |