I would like to know why following regular expression returns true:
reg = re.compile (r'[0-9]%')
reg.search ("50%")
[0-9]
would match any single digit, in this case 5. But then 0 doesn't match %, so it should return false, but it returns true.
My code might have syntax errors, but you get the gist of it.