LPS-37933 Replace the proper substring to prevent to have multiple white...

...space characters next to each other causes other replace issues