startswith() and endswith() for re's would be more intuitive
- From: "metaperl" <metaperl@xxxxxxxxx>
- Date: 28 Sep 2006 07:13:17 -0700
I just finished answering a question in #python because someone tried
to match using ... well.. match()
but did not realize that match() is actually startswith() for regexps.
I suggest:
re.compile('blah').atstartof(string)
re.compile('blah').atendof(string)
But it will never happen.
.
- Follow-Ups:
- Re: startswith() and endswith() for re's would be more intuitive
- From: Bruno Desthuilliers
- Re: startswith() and endswith() for re's would be more intuitive
- Prev by Date: Re: sqlite3 error
- Next by Date: remove the last character or the newline character?
- Previous by thread: Resuming a program's execution after correcting error
- Next by thread: Re: startswith() and endswith() for re's would be more intuitive
- Index(es):