Hi all,

I have this regexp that I wrote which will match on the specific C/C++ function 
I am looking for right up to the first open brace.  What I want to do is grab 
everything between the first open brace and the last close brace for that 
function { }.  Effectively I want my regexp to grab a specific C function in 
it's entirety.  

So far my regexp looks like this:  
s/\s*\(.*\)\s*\*\(.*\)::recv\s*(\s*int\s*\*\s*\(.*\))\s*\n*\s*\(.*\)\s*\n*\s*{  
and what it does is it grabs the beginning of any function that matches:   foo* 
bar::recv(int* foobar)   {.

I want to take it all the way to the end of the function (could be up to 50 or 
so lines) so that it matches on   foo* bar::recv(int* foobar)   { ... }.  Is 
this at all possible?  My ultimate goal is to find and remove a certain 
function in many different files.  Any suggestions/advice is welcome.

Thanks,
Justin


      
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to