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(
You should do something along these lines:
re.match("\[[b-x]-[b-x]\]", "[a-z]")
The regular expression has to define what the string should look like. If you want to match an opening square bracket followed by a letter from b to x, then a dash, then another letter from b to x and finally a closing square bracket, the solution above should work.
If you intend to validate that a regular expression is correct you should consider testing if it compiles instead.