matching adverb :exhaustive

Documentation for matching adverb :exhaustive, assembled from the following types:

language documentation Regexes

From Regexes

(Regexes) matching adverb :exhaustive

To find all possible matches of a regex – including overlapping ones – and several ones that start at the same position, use the :exhaustive (short :ex) adverb.

given 'abracadabra' {
    for m:exhaustive/ a .* a / -> $match {
        say ' ' x $match.from~$match;
    }
}

The above code produces this output:

abracadabra
abracada
abraca
abra
   acadabra
   acada
   aca
     adabra
     ada
       abra