E
Ernesto
I'm trying to get the right syntax for my regular expression. The
string I'm trying to parse is:
# myString
[USELESS DATA]
Name: David Dude
[USELESS DATA]
Right now, I'm using the following code:
pattern_Name= '''(?x)
Title:\s+(\w+)\s+
'''
names = re.findall(pattern_Name, myString)
print names
This prints out a list containing only the first names. I want to
search the string until it finds a '\n' endline, but I experimented
with that, and couldn't find what I need.
string I'm trying to parse is:
# myString
[USELESS DATA]
Name: David Dude
[USELESS DATA]
Right now, I'm using the following code:
pattern_Name= '''(?x)
Title:\s+(\w+)\s+
'''
names = re.findall(pattern_Name, myString)
print names
This prints out a list containing only the first names. I want to
search the string until it finds a '\n' endline, but I experimented
with that, and couldn't find what I need.