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