tags:

views:

87

answers:

1

Hi,

I have a C++ source file that uses functions of the form getMemberName() to return member data. Instead, I'd like to use memberName().

In order to match instances of function names that need to change, I'm using the following regular expression:

(\s+)get([A-Z])

The problem is, I don't know how to replace the instance of \2 with its lowercase version. Does anyone have any ideas, or should I resort to writing a Perl script?

Thanks,

Zach

+1  A: 

Yes you should write a Perl script for that. The built in regex engine is not powerful enough to handle something like this.

Andrew Redd