2
2biased
Hi,
Not sure that this the right group but as Perl does a lot of RegEx I
thought I might give it a shot.
Consider a large source code project with a lot lines like
const unsigned int a = 0;
const b = 1;
const bool c = FALSE;
const CString d = "10";
etc. As you see the 2nd line has no type specifier which was defaulted
to int in the previous compiler version. The new version requires the
"int" explicitly so I have to find all occurrences for
const <variablename> = <somevalue>;
A expression like
(const)(\s+)(unsigned|int|bool|CString)(.*)(;{1,1})
gives me lines 1, 3 and 4 as result as expected. But how do I get only
line 2 as result when I only know that it should not contain various
type names (bool, int, float, unsigned ...)?
I tried this for several hours now but didn't get a working solution.
Any ideas on how to do that?
Thanks a lot for your time.
Regards
Not sure that this the right group but as Perl does a lot of RegEx I
thought I might give it a shot.
Consider a large source code project with a lot lines like
const unsigned int a = 0;
const b = 1;
const bool c = FALSE;
const CString d = "10";
etc. As you see the 2nd line has no type specifier which was defaulted
to int in the previous compiler version. The new version requires the
"int" explicitly so I have to find all occurrences for
const <variablename> = <somevalue>;
A expression like
(const)(\s+)(unsigned|int|bool|CString)(.*)(;{1,1})
gives me lines 1, 3 and 4 as result as expected. But how do I get only
line 2 as result when I only know that it should not contain various
type names (bool, int, float, unsigned ...)?
I tried this for several hours now but didn't get a working solution.
Any ideas on how to do that?
Thanks a lot for your time.
Regards