title: extract function name till the bracket when there are no spaces
body: <p>i want to extract function name only from a function definition which are like this format only in Perl</p>
  
  <pre><code>static int
  function_name (...)
  </code></pre>
  
  <p>my code works for above example</p>
  
  <pre><code>$source_line =~ /^(.*?)\s/
  </code></pre>
  
  <p>But fails for the below condition when there is no space after function name</p>
  
  <pre><code>static int
  function_name(...)          
  </code></pre>
  
  <p>how do i make it extract words only till "(". </p>
  
  <p>This should work only for those case in which function name is beginning of the sentence like in the above example</p>