I had a somewhat similar problem that got solved with a line-based
state machine parser.
Cheers,
Elezar
=
Wiki Dictionary - Bosnian/Croatian/Serbian
http://izraz.com/%C4%8Cengi%C4%87_vila
--
http://mail.python.org/mailman/listinfo/python-list
Petr Jakes wrote:
> PS: just wonder why are you asking the same question in two different
> topics
Thanks for the help Peter. That happened accidentally. I meant to
only put that in python topic. Aplogies...
--
http://mail.python.org/mailman/listinfo/python-list
try to google for "finit state machine" OR "state machine" OR FSM
titles =["USELESS DATA","Request : Play",
"USELESS DATA","Title: Beethoven's 5th",
"USELESS DATA","Request : next","USELESS DATA",
"Title: song# 2 ","USELESS DATA","Request : Play",
"USELESS DATA","Title: Beethoven's 5th",
"USELESS
Ernesto wrote:
> Xavier Morel wrote:
>> Ernesto wrote:
>>> I'm not sure if I should use RE's or some other mechanism. Thanks
>>>
>> I think a line-based state machine parser could be a better idea. Much
>> simpler to build and debug if not faster to execute.
>
> What is a line-based state machine
Xavier Morel wrote:
> Ernesto wrote:
> > I'm not sure if I should use RE's or some other mechanism. Thanks
> >
> I think a line-based state machine parser could be a better idea. Much
> simpler to build and debug if not faster to execute.
What is a line-based state machine ?
--
http://mail.pyt
[hint: posting the same question in newsgroups generally
does not help to get responses any quicker]
Ernesto wrote:
> The string I'm getting data from looks like this:
> [USELESS DATA]
> Request : Play
> [USELESS DATA]
> Title: Beethoven's 5th
> [USELESS DATA]
> Request : next
> [USELESS
Ernesto wrote:
> I'm not sure if I should use RE's or some other mechanism. Thanks
>
I think a line-based state machine parser could be a better idea. Much
simpler to build and debug if not faster to execute.
--
http://mail.python.org/mailman/listinfo/python-list
So regular expressions have been good to me so far, but now my problem
is a bit trickier. The string I'm getting data from looks like this:
myString =
[USELESS DATA]
Request : Play
[USELESS DATA]
Title: Beethoven's 5th
[USELESS DATA]
Request : next
[USELESS DATA]
Title: song #2
.
I'm using
I'm trying to get the right syntax for my regular expression. The
string I'm trying to parse is:
# myString
[USELESS DATA]
Request: Play
[USELESS DATA]
Name: David Dude
[USELESS DATA]
Request: Next
[USELESS DATA]
Name: Ernesto Python User
# Right now, I'm using the following code:
patter