re.sub and re.MULTILINE

nyenyec nyenyec at gmail.com
Tue Jan 9 08:54:43 EST 2007


Paddy wrote:
> Check the arguments to re.sub.
>
> >>> re.sub('(?m)^foo', 'bar', '\nfoo', count=0)
> '\nbar'
> 
> - Paddy.

Duh! :) I appreciate it, thanks.

-- nyenyec




More information about the Python-list mailing list