title: Select prototypes before main()
body: <p>I need a regex to select the prototypes before <code>main()</code>. So for the following code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;                                                       
  
  char ga[] = "abcdefghijklm";                                             
  
  void my_array_func(char ca[10]);                                          
  void my_pointer_func(char *pa);                                           
  
  int main()                                                               
  {                                                                        
     /* code */                       
  
     return 0;                                                            
  }                 
  </code></pre>
  
  <p>There is an empty line above and below the prototypes. The selected text should be                                                       </p>
  
  <pre><code>void my_array_func(char ca[10]);                                          
  void my_pointer_func(char *pa); 
  </code></pre>
  
  <p>my current attempt in Vim is:</p>
  
  <pre><code>^\w\_.\{-}\(^\nint main\)\@=
  </code></pre>
  
  <p>but this matches</p>
  
  <pre><code>char ga[] = "abcdefghijklm";                                             
  
  void my_array_func(char ca[10]);                                          
  void my_pointer_func(char *pa);
  </code></pre>