On 7 January 2013 15:38, Gora Mohanty <g...@mimirtech.com> wrote:

> import re
> TITLE_RE = re.compile( r'#\n#([^\n]*)\n#\n \n\[([^\]]*)\]\n \n',
> re.MULTILINE|re.DOTALL )
> for m in TITLE_RE.finditer( s.strip ):
>      title, info = m.groups()
>      print title, info

Oops, that should be s.strip(), viz.,
import re
TITLE_RE = re.compile( r'#\n#([^\n]*)\n#\n \n\[([^\]]*)\]\n \n',
re.MULTILINE|re.DOTALL )
for m in TITLE_RE.finditer( s.strip() ):
      title, info = m.groups()
      print title, info

Regards,
Gora
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to