I was able to transform the string MyClassName
to my_class_name
using a regex
However my solution did not work with MyOtherTClassName
, that should transform to my_other_t_class_name
.
Also, this didn't work on ClassNumber1
either, which should be transformed into class_number_1
Without getting into my solution, that was not good enough, I would like help with the regex code that transforms:
MyClassName
->my_class_name
MyOtherTClassName
->my_other_t_class_name
MyClassWith1Number
->my_class_with_1_number
Thanks,
Guy