Regex to pull out C function prototype declarations?

前端 未结 8 648
星月不相逢
星月不相逢 2020-11-30 04:48

I\'m somewhere on the learning curve when it comes to regular expressions, and I need to use them to automatically modify function prototypes in a bunch of C headers. Does

8条回答
  •  甜味超标
    2020-11-30 05:34

    As continue of the great Dean TH answer

    This will find

    • Only functions and not the declaration too
    • And Function that returns pointers

    ^([\w\*]+( )*?){2,}\(([^!@#$+%^;]+?)\)(?!\s*;)

提交回复
热议问题