Return to Snippet

Revision: 2204
at January 16, 2007 18:24 by rengber


Initial Code
(?<=class\s)\s*\S*

Initial URL
http://aspnet.4guysfromrolla.com/articles/022603-1.aspx

Initial Description
The expression inside the parenthesis indicates a positive lookbehind.  It will match any occurance of the literal "class".  
The two slash s's represent an occurance of spaces following class and then any non space characters.  These capture the name of the class.

Initial Title
Regular Expression to Grab a ClassName from a C# Code File

Initial Tags

                                

Initial Language
Regular Expression