In javascript, I use the next code to strip off linefeeed and carriage return of a string and it works well:
var values="something....."
var sanit=values.replace(/(\r?\n|\r\n?)/g, "");
In Delphi, I am trying the next code:
values="something....."
sanit:=TRegex.Replace(values,'/(\r?\n|\r\n?)/g', '');
But it doesn´t work. No replace is done.
(?:\r?\n|\r)+
sanit := StringReplace(values,#$D#$A,'',[rfReplaceAll]);