且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用REGEXP_REPLACE在Oracle服务器中用一个新换行符替换多个换行符

更新时间:2023-01-14 18:38:26

我认为这就是您所追求的.根据您使用的是Windows还是UNIX,处理回车符可能会很棘手,但是您会明白的.这是在Toad中运行的,它使用正则表达式查找连续出现两个或多个换行符的字符,并用一个换行符替换它们.

I think this is what you are after. Dealing with carriage returns can get tricky depending if you are on Windows or UNIX but you'll get the idea. This was run in Toad, which uses a regular expression which looks for occurrences of two or more newline characters in a row and replaces them with one newline.