User Tools

Site Tools


regex

This is an old revision of the document!


>>> p = re.compile('section{ ( [^}]* ) }', re.VERBOSE)
>>> p.sub(r'subsection{\1}','section{First} section{second}')
'subsection{First} subsection{second}'

references

regex.1249374660.txt.gz · Last modified: 2013/08/03 05:04 (external edit)