> -----Original Message-----
> From: SteveKing [mailto:steveking@gmx.ch]
>
> Peter Mounce wrote:
> > A start on a CSharp regex (I'm quite the novice when it comes to
> > regex), built with a tool that uses the .NET regex library:
> >
> > (NOCASE) .cs =
>
> Is C# really case insensitive about variable names and
> keywords like 'public', 'protected', ...?
No. Correct. Oops.
> > (?:public|protected|private)\s+((\w+[\.]+)*(\w+)\s+)+(\w+)
>
> A test with this on some test C# files I have lying around
> shows that it also matches e.g. 'class', 'void', 'this', ...
> This is definitely not something we want in the autocompletion.
Mark II:
.cs =
(?:public\s+|protected\s+|private\s+)(?:(?:\w+[\.]+)*\w+\s+)+(\w+)
It matches property indexers, for example:
public HandsetRow this[int index] {
get {
return ((HandsetRow)(this.Rows[index]));
}
}
will match "this".
On an auto-generated dataset C# file of about 80Kb, the benchmark returned
39seconds. On a C# windows form, 40Kb, it took 6seconds.
> Every string you see in the output window (except the empty
> lines) are added to the autocompletion.
> And no, we won't change those matches. I mean we're using
> regexes here so we don't have to do that.
Ah; I'd misunderstood the brief, then.
> > Can you change the test tool so it's resizable, please?
>
> It's just a test tool!
>
> But I've just uploaded a new version of it which doesn't
> print the empty lines anymore.
Cheers ;-)
Peter Mounce
IML Ltd
e: mailto:petermounce_at_iml.co.uk w: http://www.iml.co.uk
t: (01428) 727476 f: (01428) 727011
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Mon Feb 21 18:41:27 2005