a guest Dec 4th, 2018 113 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- Sub Foo()
- Dim regex As Object
- Set regex = CreateObject("VBScript.RegExp")
- regex.Global = True
- regex.Pattern = "(\((?>[^()]+|(?1))*\))"
- ' aa(bb)cc
- ' (aabbcc)
- ' (aa)bb(cc)
- Debug.Print regex.Test("aa(bb)cc")
- End Sub
RAW Paste Data