By default Text.Replace do case sensitive replacing. Sometimes we need to do case-insensitive replacement. I have created a custom function that will do the case-insensitive replacing. Here is the function.
(Text as nullable text,Old as text,New as text)=>
let
// Text = """Hello, world! Hello, World!"", ""World""",
// Old = "World",
// New ="Universe",
StartPositionsOfOldText = List.Reverse(Text.PositionOf(Text,Old,Occurrence.All,Comparer.OrdinalIgnoreCase)),
ReplacedText = List.Accumulate(StartPositionsOfOldText,Text,(State,Current)=>Text.ReplaceRange(State,Current,Text.Length(Old),New))
in
ReplacedText
Here is a snapshot of using it: