title: Regex to detect begining of the c function body
body: <p>I working on a perl script that prints the required function body from the c source file. i have written a regex to get to the start of the function body as</p>
  
  <pre><code>(/(void|int)\s*($function_name)\s*\(.*?\)\s*{/s
  </code></pre>
  
  <p>but this works only for functions returning void or int(basic types)
  how can i change this regex to handle user defined datatypes (struct or pointers)</p>