[Tutor] python regex help

Arun Tomar tomar.arun at gmail.com
Sun Sep 28 16:46:14 CEST 2008


hi!

i've data extracted in the form of list using regex.
it looks something like the one below. 
====================================================
print reobj
['Jyoti Soni - 0 Year(s) 0 Month(s)\n', 'Tel: 09975610476(M)\n', '\n',
'Minal - 0 Year(s) 0 Month(s)\n', 'Tel: 9890498376(M)\n', '011 02162
250553(R)\n']
====================================================
i'm trying to use regex to remove the following information
1. - 0 Years *
2. Tel: & (M)
3. (R)
 & store the remaining portion as a new list.

I've been using shell scripting & using sed & pipes i've solved it, but
with python, i need to practice more ;).

regds,
arun.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/tutor/attachments/20080928/c7a8da6f/attachment.pgp>


More information about the Tutor mailing list