BREAKING CHANGE: This PR changes the signature and behavior of the keys, values, and items methods of the Automaton class to process the optional pattern parameter as a Unix shell glob-style pattern.
Currently only the '?' (match any single character) and '*' (match zero or more characters) wildcards are supported (so no character classes nor ranges). The '\' character is reserved as the wildcard escape character (so any literal '\' in a pattern must itself be escaped as '\\\\' or r'\\').
The optional wildcard parameter is gone. The values for the optional how parameter can be one of MATCH_PREFIX (default; prefix match on keys) and MATCH_WHOLE (full match on keys).
@melsabagh-kw Let me review this in details... but I will not merge this in 2.0.0, rather this would be considered after since we had betas out and are about to release the final 2.0.0
BREAKING CHANGE: This PR changes the signature and behavior of the
keys
,values
, anditems
methods of theAutomaton
class to process the optionalpattern
parameter as a Unix shell glob-style pattern.Currently only the
'?'
(match any single character) and'*'
(match zero or more characters) wildcards are supported (so no character classes nor ranges). The'\'
character is reserved as the wildcard escape character (so any literal'\'
in apattern
must itself be escaped as'\\\\'
orr'\\'
).The optional
wildcard
parameter is gone. The values for the optionalhow
parameter can be one ofMATCH_PREFIX
(default; prefix match on keys) andMATCH_WHOLE
(full match on keys).