s/Failure Detail - //g; # must come before next regexp s/³(Pass|Fail)/³$1³/; # Pass -> Pass³, Fail³ -> Fail³³ (implied :)