I\'m just wondering if it\'s possible to use one regular expression to match another, that is some sort of:
[\'a-z\'].match([\'b-x\'])
True
[\'m-n\'].match(
It's possible with the string representation of a regex, since any string can be matched with regexes, but not with the compiled version returned by re.compile. I don't see what use this would be, though. Also, it takes a different syntax.
Edit: you seem to be looking for the ability to detect whether the language defined by an RE is a subset of another RE's. Yes, I think that's possible, but no, Python's re module doesn't do it.