2023-07-26

How to check if one wildcard expression (AKA glob) contains another wildcard expression?

I have two wildcard expressions g1 and g2, and I would like to know whether g1 contains g2. For example:

g1 = "*.txt"
g2 = "hello*.txt"

In this case g1 contains g2.



No comments:

Post a Comment