DrDamnit
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"?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.