regex - unable to match this regular expression in python -
i trying match regular expression using python in code.
cds_regex = re.compile(r'\+cds:\s*"([^"]+)",\s*(\d+)$') cdsimatch = alllinesmatchingpattern(self.cds_regex, notificationline) print cdsimatch matching string:
['+cds: 24', '079119890400202306a00aa17909913764514010106115225140101061452200'] please me not able find mistake,
- as @blckknght said, sure want match string?
- what
([^"]+)supposed match? - you're looking
"instead of'(you want['"]). - you're checking numbers here:
(\d+), long string containsa's.
Comments
Post a Comment