startswith() and endswith() for re's would be more intuitive

Fredrik Lundh fredrik at pythonware.com
Thu Sep 28 17:39:49 EDT 2006


metaperl wrote:

> Nothing. There is also nothing wrong with
> 
> re.match('blah', somestring)
> 
> but it does read as well as
> 
> re.atstartof('blah', something)

yuck.

> and the counterpart for EOS is not there.

sure is; it's spelled:

     re.match('.*blah$', somestring)

</F>




More information about the Python-list mailing list