excelexcel-formula

How to change the case of a character in a specific expression, using regex?


I have texts like that:

Hic requiesc<i=E>t in pace Gundeberga

And I would like to turn =E into =e, that means equal sign followed by any uppercase letter into the same lowercase letter. However, I don't want to change the case of the other letters (Hic, Gundeberga) :

Hic requiesc<i=e>t in pace Gundeberga

I tried =REGEX.REPLACE(A1;"=[A-Z]";"=[a-z]";0;1) but it doesn't work, since [a-z] doesn't appear to be a regex.


Solution

  • =REGEXREPLACE(A1,"(=[A-Z])","\L$1") for first letter after = or =REGEXREPLACE(A1,"(=[A-Z]*)","\L$1") for all letters until next non letter symbol

    Both formulas in B2 and B3 respectively:

    enter image description here