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
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
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