<a href="http://docs.python.org/library/re.html#re.compile">http://docs.python.org/library/re.html#re.compile</a><div><br></div><div>The doc says : &quot;Compile a regular expression pattern into a regular expression object, which can be used for matching using its match() and search() methods, described below.&quot;</div>
<div><br></div><div>However if you do a dir of the resulting object under python 2.6 the object actually supports all of the methods listed in the doc.</div><div><br></div><div>I went around trying to figure out how I was going to upgrade to python 2.7 in order to do a multiline &quot;subn&quot; regex and then found a <a href="http://stackoverflow.com">stackoverflow.com</a> answer that indicated you could call &quot;subn&quot; from this object. I then did a dir on the object and found it supported all the methods.</div>
<div><br></div><div>I suggest you change the doc to either say : </div><div><br></div><div>&quot;Compile a regular expression pattern into a regular expression object, which can be used for matching using its match(), search(), split(), findall(), finditer(), sub() and subn() methods, described below.&quot;</div>
<div><br></div><div>or </div><div><br></div><div><div>&quot;Compile a regular expression pattern into a regular expression object, which can be used for matching using any of the methods described below.&quot;</div></div>
<div><br></div><div>-Gene Wood</div><div><br></div><div><br></div>