Link to home
Start Free TrialLog in
Avatar of DrDamnit
DrDamnitFlag for United States of America

asked on

RegEx Question

I am trying to write a program the recognizes VB lines such as Public Sub.....() Private Function....() etc..

I do NOT want Private|Public Declare statements. Only subs and functions.

The regular expression I am using is:

.Pattern = "[Private|Public Function|Sub].*\)"

That is, of course, picking up the Declare statements. How do I write one that says "Private or Public AND one space AND Function or sub, followed by any number of anything, and ending in a closed parenthesis"?
ASKER CERTIFIED SOLUTION
Avatar of Ravi Singh
Ravi Singh
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial