Basically I want to parse some C++ source code and replace some
constants.
I've mangaed to read in the file and replace some of the things that
need replacing. but I'm having a hard time matching a particular
pattern. For example:
cout << "This is a \"String\"" << "With some text";
printf("This is another possible \"string\"") ;
needs to become:
cout << L"This is a \"String\"" << L"With some text";
wprintf(L"This is another possible \"string\"") ;
So I need a pattern that will match only the first " of every
substring but not match the final " or \" ....
Could someone point me in the right direction.. thanks for the help..
Alex
constants.
I've mangaed to read in the file and replace some of the things that
need replacing. but I'm having a hard time matching a particular
pattern. For example:
cout << "This is a \"String\"" << "With some text";
printf("This is another possible \"string\"") ;
needs to become:
cout << L"This is a \"String\"" << L"With some text";
wprintf(L"This is another possible \"string\"") ;
So I need a pattern that will match only the first " of every
substring but not match the final " or \" ....
Could someone point me in the right direction.. thanks for the help..
Alex
Comment