in reply to Re^2: C/C++ function parsing
in thread C/C++ function parsing

I would make 2 suggestions here. First, at the end of your regex add the "/s" modifier to make the regex look at multiline output as single line. Like so:

if(!$sw_test && (/([:\w]+)\((.*\))/s) )
Second, google "The Regex Coach", download, install, and use it. I am no expert at Regex at all, so this software has saved my sanity time and again! It's not perl specific, but it always works in my code. Basically, you can input your data (one or more lines) you want to regex against in the 2nd window in the GUI, then use the top window to test your regex in real time (you enter everything you would ordinarily enter between the slashes).

When I run your examples through TRC, your regex code works fine with the addition of "/s" as noted above.

ImJustAFriend