So the problem is a bit reversed: I have a regular expression and would like to extract possibilities from it. I don't have a string yet, I just want to know what would match. An example could be:
import re
license = re.compile("^[0-9]{3}[A-Z][0-9]{3}$")
I know that when using re.DEBUG, the list of character classes is displayed in order. Static characters are shown as well. This would be just what I'd like to get, a list of objects representing "parts" of my regular expression. The first would represent the beginning of the string, the next would represent a character class including from 0 to 9 and repeated three times, and so on.
Is that possible at all using regular expressions? I know it's supposed to be the other way around.
Thanks for your help,