Oh! yes you can use re for that.
You just need to change the pattern a bit
I did not understand where the "title" will be so I have ignored it,
but I got something below which will be helpful for you
>>> value = """name:asasasasas\nrequest: play\ntitle"""
>>> reg = re.compile('Name:.*\\nrequest:.
So now I need to add the requirement that only "Name:" 's which are
followed by
"Request: Play" or "Request: Next" ANYWHERE between the previous titles
and the new titles. Can I use RE's for that ?
Ernesto wrote:
> I'm trying to get the right syntax for my regular expression. The
> string I'm
try this. maybe this is what you want?
reg = re.compile('Name:.*\\n', re.IGNORECASE)
--
http://mail.python.org/mailman/listinfo/python-list
The word "Title" there should be "Name".
What I really need is the pattern for getting the entire string after
"Name: " until a '\n' is found.
--
http://mail.python.org/mailman/listinfo/python-list