I have a number of classes that I'd like to rename in SWIG. Most of my classes look like this
some_class, which I'd like to rename to SomeClass. This is easy:
%replace("%(camelcase)s", %$isclass) "";
However, I also have class names that end in "_t" which I'd like to strip, so my_class_t would become just MyClass. I can do just this operation with:
%rename("%(regex:/^(.*)(_t?)$/\\1/)s", %$isclass) "";
Is there a rename rule that will let me apply both of these actions?