On Wed, 15 Jun 2005 23:03:55 +0000, Mark Harrison wrote:
 
> What's the most efficient way to process this?  Failing all
> else I will split the string into characters and use a FSM,
> but it seems that's not very pythonesqe.

like this ?

>>> s = "@[EMAIL PROTECTED]@@[EMAIL PROTECTED]"
>>> s.split("@")
['', 'hello', 'world', '', 'foo', 'bar']
>>> s2 = "[EMAIL PROTECTED]@@[EMAIL PROTECTED]"
>>> s2
'[EMAIL PROTECTED]@@[EMAIL PROTECTED]'
>>> s2.split("@")
['hello', 'world', '', 'foo', 'bar']
>>> 

bye
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to