The same regular expression should work for another string (with *200).

On Jan 16, 5:40 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-01-16, Victor Polukcht <[EMAIL PROTECTED]> wrote:
>
> > Actually, i'm trying to get the values of first field (Global) , fourth
> > (200, 4), and fifth (100%) and sixth (100%).
>
> > Everything except fourth is simple.
> >>> g = "Global             etsi3  *   4 ok     30 100% 100% Outgoing"
> >>> import re
> >>> r = re.search('\*\s+(\d+)', g)
> >>> r.group()
> '*   4'
> >>> r.group(1)'4'
>
> --
> Neil Cerutti
> We're not afraid of challenges. It's like we always say: If you want to go out
> in the rain, be prepared to get burned. --Brazillian soccer player

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

Reply via email to