Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

.NET VB New Sub Replace Help? Not Quite Right

  •  01-28-2008, 1:24 AM

    .NET VB New Sub Replace Help? Not Quite Right

    Hi Guys,

     I am trying to generate some dynamic code. and need to replace the Public Sub New in vb.net

    Multiline and Case ignore is on and i am using .net regex engine.

    (PUBLIC|PRIVATE)\s+(SUB)\s+NEW([.\n]*|(END\s+SUB|END\s+FUNCTION))

    I Needs To Match

    Public Sub New()      *(With Or Without Brackets) - (Can be Either Public OR Private As Well)
                <Anything Here Could be 100lines long...>
    End Sub

    Any Ideas?
    Beachnerd
     

    Filed under: , , , ,
View Complete Thread