Options is a (possibly empty) list of atomic option names, as described in the library(regex) page.
AllMatches is bound to a list of strings. If the input string String does not match the pattern, the list is empty. Otherwise the list contains substrings of String which match the entire pattern, ordered according to their occurrence within String. No overlapping matches are returned, i.e. the next match is found by examining the remainder of String after the previous match.
Note that this predicate does not return any information about matching (parenthesised) sub-expressions!
?- matchall("[0-9]+", " blue 27 red123 green99", [], L). L = ["27", "123", "99"] Yes ?- matchall("([0-9]+|[^0-9]+)", " blue 27 red123 green99", [], L). L = [" blue ", "27", " red", "123", " green", "99"] Yes