in reply to Preserve Case in Regexp
Given that perl won't do exactly what you want, perhaps a reasonable compromise is to have it provide a fallback that's easy enough.
Suppose you use your favorite text editor just to create a list of the mixed-case name replacements -- e.g. the self-respecting unix guru would do something like this:
Now create a version of the list that includes the downcased names along with the original mixed-case ones:$ cat > ClRename.sed s/OldClass/NewClass/g s/RedClass/BlueClass/g s/BadClass/GoodClass/g ... ^D
The latter output file is now suitable for use as a script (for 'perl -pi.bak' or 'sed -f'). Not the most efficient algorithm, perhaps, but usable.perl -pe 'print lc' ClRename.sed > flAndClRename.sed
In Section
Seekers of Perl Wisdom