On Tue, Feb 17, 2009 at 7:13 PM, Bill Baxter <wbax...@gmail.com> wrote: > > Ok. I'm certainly not in love with the API either. Though, the only > RegEx API I've ever used that felt totally comfortable with was > Perl's, which in large part is syntax instead of an API. Python's > syntax I have to look over the documentation every time I use it, too. > Maybe it's because of the "matching" vs "searching" distinction that > I find impossible to remember. > (http://docs.python.org/library/re.html) >
Is there ever a situation where you want to use a single regexp for both matching _and_ searching? And if not, couldn't you just use ^ to anchor it? I never understood why Python's API makes such a distinction.