[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn stat on new files

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-12-07 01:46:29 CET

Kirby C. Bohling wrote:

> From my limited understanding of Python, the regular expression has to
>match the entire input, partial matches don't count.
No, that's wrong. The difference between re.match and re.search is that
re.match is implicitly anchored at the beginning of the search string,
while re.search is not.

> The method search
>(I believe it's search, I know there is another similar method) is grep
>like, and behaves the way you describe. Basically match prepends ^, and
>appends $ after the regex if I understand correctly.
No. Read the docs in the "re" module carefully. They're a bit confucing,
I admit, but the examples help you understand what's going on.

The funny thing is that if you use re.match(str, N), where N>0, an
expression starting with "^" will never match -- because "^" matches the
beginning of a string, and you're telling re.match to start beyond that. :-)

Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 7 01:47:17 2002

This is an archived mail posted to the Subversion Dev mailing list.