Regex question

Tjabo Kloppenburg tjabo.kloppenburg at unix-ag.org
Wed Sep 18 22:41:52 EDT 2002


hi,
"Eric Arnold" <umop at psyon.org> wrote:

> The string I'm capturing is as follows:
> Name:AAA,BBB,CCC

why regexp?

just do:
splitted1 = s.split(":",2)     # --> splitted[0] == Name
events = splitted1.split(",")  # = list of events

it is not that cool, but it runs without brainsucking experiments... :)

tk.
--
Tjabo Kloppenburg
  --=- In  95.82 Tagen ist Weihnachten! -=--

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20020919/b8ed832d/attachment.sig>


More information about the Python-list mailing list