Hi folks, i have a string that contains a collection of visual basic methods, i'm trying to write a regular expression statement that can catch methods that look like this.
Code:
Public Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
(A Bunch of code lines here)
End Sub
What I've got so far for a regular expression is
Code:
"Public\\sSub\\s(.*)_(.*)\\sHandles\\s(.*)\\.(.*)\\s?\\n(.*\\n)\\s*End\\sSub"
The trouble is it returns no matches and I'm not sure why. Seems regular expressions are meant to function on single line strings. I've tried removing the End Sub portion of the the expression and that works, giving me just the header and it's match groups. I'm coding this in c#. Thanks for any help you can provide.