I do have several source code files (.cpp) containing the following line:
other stuff
...
TRACE(arg1, arg2, ...);
...
other stuff
where arg1, arg2, ... denote arbitrary function call arguments separated by a comma and possibly preceded by a whitespace.
The goal is to parse each line in each source file in my project and remove the first argument (arg1) from the function call TRACE, such as
TRACE(arg2, arg3, ...);
Note that function TRACE can be preceded by an arbitrary number of whitespace and can itself contain the string TRACE such as
TRACE(0, TRACE_INFO, "Test ");
TRACE( 0 , TRACE, 4,5 ,6);
Is there an easy way to do so ?
A test file test.cpp contains:
TRACE( "I2Ccontrol::I2Ccontrol", TRACE_FATAL,0);
3 White spaces, no preceding lines no following lines