'==================================================================
'Function name: ReplaceTrim
'Effect: filter out all tabs, carriage return and line breaks in characters
'==================================================================
PublicFunctionReplaceTrim(ByValstrContent)
OnErrorResumeNext
Dimre
Setre=NewRegExp
re.IgnoreCase=True
re.Global=True
re.Pattern="("&Chr(8)&"|"&Chr(9)&"|"&Chr(10)&"|"&Chr(13)&")"
strContent=re.Replace(strContent,vbNullString)
Setre=Nothing
ReplaceTrim=strContent
ExitFunction
EndFunction
Articles that may be of interest to you:
CHR(10) means line break, CHR(13) means carriage return, CHR(32) means space replaces the carriage return line break contained in the string in textarea with <br> javascript code in windows /r/n is different from /n in class unix. Question understanding (crlf carriage return line break) Js carriage return line break processing method and replace method to remove carriage return line break space in oracle. Detailed explanation of the problem of reading to carriage return line break