On Aug 3, 8:27 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Jul 22, 2:00 pm, AMD <[EMAIL PROTECTED]> wrote:
>
> > Hello Fredrik,
>
> > I didn't think my comment would offend anyone [...]
>
> I doubt that it offended anyone else.  Having been the recipient of a
> few F-bombs :-) myself, I'd just let it go by...
>
> Mike

The regular expression module (re) should be pretty handy at this.
This may not be a typical case, but:

>>> re.match( r"([0-9]+) ([0-9]*.?[0-9]+) (.{1,5})", '1 2.02 abcde' ).groups( )
('1', '2.02', 'abcde')

The float catcher doesn't catch "2."  If you need that to work or
other classes, speak up.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to