I want to chop off last character if it is lower case and second last one is upper case. For example.
14-ME -> 14-ME
MEA -> MEA
MEAm -> MEA #like this one
mama -> mama
How to write the regx ? I am thinking of something like r”(.+?)” but not sure how to do conditional thing on the last part. The word could have anything like ()-,+ too.
thanks
Don’t really need a regex to do this when you can write a simple piece of code to do it.
Or if you don’t want the exception stuff…