in reply to Matching a regular expression group multiple times
As far as I know, there are (just) two issues at-bar here:
- If you want to match zero-or-more adjacent occurrences of a single string, in any particular place within the source, then you must use a quantifier such as + ... and the search should be “greedy.”
- If you need to match multiple times within the same string, the modifiers /gc should be used, within a loop that will then search through and exhaust the input string.
And, that’s it.
In Section
Seekers of Perl Wisdom