grouping in regular expressions.
kaevee at my-deja.com
kaevee at my-deja.com
Tue Jul 18 08:35:27 EDT 2000
I am finding it difficult to match the ip address in the
following line using re module.
" inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0"
here is the expression I used.
re.compile('\s+inet addr:(\d+\.\d+\.\d+\.\d+)\s+.*')
I am not able to make out where i am making a mistake.
Tons of thanks in advance,
Regards,
kaevee
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list