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

RE: [TSVN] C# regex (Was: [TSVN] Autocompletion list in the commit dialog)

From: Eric J. Smith <eric_at_ericjsmith.net>
Date: 2005-02-21 19:23:06 CET

> .cs =
> (?:public\s+|protected\s+|private\s+)(?:(?:\w+[\.]+)*\w+\s+)+(\w+)

Hrmm... I was working on one for C# as well, but I was trying to be too
fancy. I think I like this one better. Simple, fast and gets 90% of the
members. The only members that it doesn't pick up are ones that don't have
access modifiers, but not having access modifiers is a bad practice in my
opinion and try to pickup items without access modifiers is very expensive.

Here is a modified version of the C# regex to address a couple items:


1. Adds the internal access modifier.
2. Allows member names to contain numeric digits and underscores.

Eric J. Smith

To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Mon Feb 21 19:26:47 2005

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