RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details C# Methods
Expression
(private|public|protected)\s\w(.)*\((.)*\)[^;]
Description
Finds all public or private C# methods with a return type, with or without parameters. Excludes private and public members which may look like a method. Private and public members that can be confused with methods typically have a semicolon after the closing parentheses. NOTE: Visual Studio uses a non-standard regular expression syntax for Find and Replace. The eqivalent pattern is: (private|public|protected):b:w(.)*\((.)*\)$
Matches
public void SQLSelect(Form fo)
Non-Matches
private G G = new G();
Author Rating: The rating for this expression. Robert S. Robbins
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials