Revision: 2230
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 18, 2007 12:30 by rengber
Initial Code
\S* \s* (?=\=\s*new\s)
Initial URL
Initial Description
This expression grabs the token preceding the = sign which precedes the keyword new. The expression within the parenthesis is a positive lookahead which matches an equal sign followed by zero or more spaces, then zero or more characters (for example an explicit cast) followed again by zero or more spaces, finally the keyword new, and at least one space.
Initial Title
Regular Expression to Grab an Object Reference Name from a C# Code File.
Initial Tags
Initial Language
Regular Expression