in reply to m//g in list context
"All possible" implies matches that overlap with other matches. This isn't how regexs work. With /g, the search for the next match begins immediately after the prior match.
In your example, applying the regex m/(\w):(\w)/g to "a:b:c" matches once ("a:b"). The next search begins at ":c", which doesn't match.
|
|---|