May-15-2019, 06:34 AM
Hi,
I have this code:
This is what I get in my output:
I have this code:
import re
text = 'NoErrorRE: [EXTERNAL] PL_192_01_28Claire Gravell KingService EscalationNormal'
p = re.compile(r'^NoError.*\s*$')
matches = p.finditer(text)
for match in matches:
print(match)What I'm trying to do is to get, from a string, a sentence that start's with 'NoError', then anything after it, but I want everything to the end of the sentence. This is what I get in my output:
Output:<re.Match object; span=(0, 79), match='NoErrorRE: [EXTERNAL] PL_192_01_28Claire Gravell >'Gravell KingService EscalationNormal' is ignored from the ouput, how do I fix my regex to get the full text back?
