Re: [Tutor] re and MULTILINE

2007-02-20 Thread Marilyn Davis
On Tue, 20 Feb 2007, Kent Johnson wrote: > Marilyn Davis wrote: > > Hello Tutors, > > > > I'm trying to get a grip on MULTILINE and I guess I don't have it. > > > > Here's some code: > > > > #!/usr/bin/env python > > import re > > > > def sub_it(mo): > > return 'xxx' > > > > def test(re_str, d

Re: [Tutor] re and MULTILINE

2007-02-20 Thread Kent Johnson
Marilyn Davis wrote: > Hello Tutors, > > I'm trying to get a grip on MULTILINE and I guess I don't have it. > > Here's some code: > > #!/usr/bin/env python > import re > > def sub_it(mo): > return 'xxx' > > def test(re_str, data): > return re.sub(re_str, sub_it, data, re.MULTILINE) > The

[Tutor] re and MULTILINE

2007-02-20 Thread Marilyn Davis
Hello Tutors, I'm trying to get a grip on MULTILINE and I guess I don't have it. Here's some code: #!/usr/bin/env python import re def sub_it(mo): return 'xxx' def test(re_str, data): return re.sub(re_str, sub_it, data, re.MULTILINE) if __name__ == '__main__': data = '''Be