I've inherited a bunch of C++ files that need to have function and variable names changed to meet our new C++ coding 'standards'.
Like all C/C++ code, there are variables/functions such as my_new_function or My_Newer_Function...
The Java folks have forced a camel cap style on us, so what I want to do is search for any underscore and make the next letter capitalized and have the underscore removed, that is:
my_new_function becomes myNewFunction
and
My_Newer_Function becomes MyNewerFunction
also, if the name has a number in it such as my_8th, it just removes the '_' to become my8th. This should probably be a separate regex.
I have some general knowledge of regex but this one has stumped me.. and with so many files and so little time, I have come to the beneficent gathering of the members of SO for help.
Thank you in advance.
Yes, I know, I should make the Java folks do this, but I just work here...
;-)