php and editplus regular expressions remove blank lines, editplus regular expressions
remove blank lines inside the string:
Copy code The code is as follows:
$str = preg_replace("/(s*?r?ns*?) /","n",$str);
Remove all blank lines, including internal and trailing lines:
Copy code The code is as follows:
$str = preg_replace('/($s*$)|(^s*^)/m', '',$str);
Regular expression to replace blank lines in editplus:
Regular expression: ^[tn]*n
http://www.bkjia.com/PHPjc/985271.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/985271.htmlTechArticlephp and editplus regular expressions remove blank lines, and editplus regular expressions remove blank lines inside the string: Copy code The code is as follows: $str = preg_replace("/(s*rns*) /","n",$str)...