I want to transform this:
Public [Function|Sub] XXXX(ByVal param1 As aaaa, ByVal param2 AS bbbb) As cccc
Into this:
Log("Method XXXX:", "param1", param1, "param2", param2)
The number of parameters is variable.
Can I do it in pure regexp, and if so, how can I do it ?
I will use a simple tool like this: http://gskinner.com/RegExr/ to do it manually for each method.
I am here:
Public (Function|Sub) ([\w\d_]+)\((ByVal .* As .*)*\)( As [\w]+)?
Log("Method $2:", $3)
Which gives me this:
Log("Method XXXX:", ByVal param1 As aaaa, ByVal param2 AS bbbb)
It's a small step forward, but not really a big one...
The problem being, I don't know if (and how) it's possible to catch a repeating sub-item. Other questions point to it not being possible ?
I need to do it in pure regexp, not in code. Otherwise, I will use copypasta, but I would love to maximize the automation.
Thanks !