I would like some help with regular expressions to do the following:
I have lines of code which appear as following:
if ( variable1 == rhs.variable1 ) x = 2;
where "variable1" changes from line to line e.g. variable1 could be something like
if ( xyz== rhs.xyz) x = 2;
I want to replace all these lines with the following:
if ( allocate( variable1, rhs.variable1 ) ) x = 2;
where allocate is a function.
Can anybody tell me how to use regular expressions so I can do a replace on the source file so I can make the changes?
Thanks in advance