You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need both possessive and reluctant wildcards in glob dictionaries to express rules like "anything with a trailing X":
* X
The above rule currently fails on inputs like:
Foo X X
because the first X matches the rule and there is a non-empty trailing substring.
Implementing exhaustive (greedy or reluctant) rules doesn't make much sense to me (and it can be easily abused) but I'll add support for both reluctant and possessive forms which express majority of the potential intentions and use cases. This will also change the default "" from reluctant to greedy and make "?" a reluctant equivalent to make it a bit more consistent with regular expressions. We will thus have the following glob "operators":
? - exactly one token
*? - zero or more tokens (reluctant)
* - zero or more tokens (possessive)
+? - one or more tokens (reluctant)
+ - one or more tokens (possessive)
The text was updated successfully, but these errors were encountered:
We need both possessive and reluctant wildcards in glob dictionaries to express rules like "anything with a trailing X":
The above rule currently fails on inputs like:
because the first X matches the rule and there is a non-empty trailing substring.
Implementing exhaustive (greedy or reluctant) rules doesn't make much sense to me (and it can be easily abused) but I'll add support for both reluctant and possessive forms which express majority of the potential intentions and use cases. This will also change the default "" from reluctant to greedy and make "?" a reluctant equivalent to make it a bit more consistent with regular expressions. We will thus have the following glob "operators":
The text was updated successfully, but these errors were encountered: