MacroToolsVBA
MacroToolsVBA copied to clipboard
Confusing Regex-Pattern
There is this line in the Obfuscation Module:
sPattern = "([\s])" & sFinde & "(\_{1}[A-Za-zÀ-ßà-ÿ¨¸]{4,40}(?:\:\s|\n|\r))"
Why exactly is there (?:\:\s|\n|\r)
? It breaks the obfuscation when I manually call a control event
e.g.
Private Sub MyCombobox_Change() <== This gets obfuscated correctly
Do Something
End Sub
Private Sub SomeOtherSub()
MyCombobox_Change <== This one stays and is not obfuscated, therefore break the code
End Sub
I removed (?:\:\s|\n|\r)
and it worked for me. But I wonder if it has an important purpose?