-5

I am trying to match regular expression using python in this code.

CDS_REGEX = re.compile(r'\+CDS:\s*"([^"]+)",\s*(\d+)$')
cdsiMatch = allLinesMatchingPattern(self.CDS_REGEX, notificationLine)
print cdsiMatch

Matching String:

['+CDS: 24', '079119890400202306A00AA17909913764514010106115225140101061452200']

Please help me i am not able to find my mistake,

kasravnd
  • 94,640
  • 16
  • 137
  • 166
Anshu
  • 1

1 Answers1

-1
  1. As @Blckknght said, are you sure you really want to match that string?
  2. What is ([^"]+) supposed to match?
  3. You're looking for " instead of ' (you probably want ['"]).
  4. You're only checking for numbers here: (\d+), but your long string clearly contains A's.
Luke Yeager
  • 1,292
  • 1
  • 13
  • 28