Re: [Tutor] Help with re.sub()

2006-03-16 Thread Hugo González Monteverde
Hi John, I would just like to suggest a different approach. Like the old saying goes: Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems. — Jamie Zawinski, in comp.lang.emacs If the delimiter is a

Re: [Tutor] Help with re.sub()

2006-03-16 Thread Danny Yoo
> I have a file that is a long list of records (roughly) in the format > > [EMAIL PROTECTED] > > So, for example: > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > > > What I would like to do is run a regular expression against this and > w

Re: [Tutor] Help with re.sub()

2006-03-16 Thread Kent Johnson
John Clark wrote: > Hi, > > I have a file that is a long list of records (roughly) in the format > > [EMAIL PROTECTED] > > So, for example: > > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] > > > What I would like to do is run a regular

[Tutor] Help with re.sub()

2006-03-16 Thread John Clark
Hi, I have a file that is a long list of records (roughly) in the format [EMAIL PROTECTED] So, for example: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] What I would like to do is run a regular expression against this and wind up with: [EMAIL