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

Re: [TSVN] Autocompletion list in the commit dialog

From: Rainer Müller <mueller_rainer_at_gmx.de>
Date: 2005-02-17 18:41:51 CET

Douglas Stonham wrote:
> Just a thought, but rather than empty matches, I think these are carriage
> returns being included in the returned match (which may or may not be a
> problem for the autocomplete list).
>
> I believe \s actually matches cr and lf so the initial \s+ is probably at
> fault here. Could you try...
>
> (MULTILINE) .php = [
> \t]*class|(?<=(?=public|private|)\s+function)\s(\w+)|::(\w+)|->(\w+)
>
> ... and see if the empty lines disappear? I also changed the first + to *
> since I am assuming (possibly incorrectly) that the 'class' word could be
> the first thing on a line?

There is no difference between the version with \t and the one with \s.

Yes, you're right with the + to * conversion. I did not recognize that
the class isn't matched at all, because the name of the class still
appeared because the constructor was there, too.

Here is a improved version of the regex, which will now match classes
the right way:

(MULTILINE) .php =
^\s*class\s+(\w+)|^\s*(?:(?:public|private|)\s+function)\s+(\w+)|::(\w+)|->(\w+)

Rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Feb 17 18:50:28 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.