Posted By

rengber on 01/17/07


Tagged

csharp RegularExpression SourceCodeAnalysis


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

copyleft
enajenkins
Tyster
danfinrud55


Regular Expression to Grab a Method Name from a C# Code File.


 / Published in: Regular Expression
 

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

The expression in parenthesis is a positive look ahead. It seeks a single open parenthesis. The to slash s expressions will seek whatever non space characters precede the parenthesis by zero or more spaces.

  1. \S*\s*(?=\()

Report this snippet  

You need to login to post a comment.