我怎么能写Perl的正则表达式模式,将工作,这样的:如何删除换行符和空格,并用Perl中的空白字符替换它们?
**If there is a new line**, after it, it will remove that new line character and all the whitespace characters after until it sees any character except for a white space character and will put just one whitespace character instead of them?
\ S *表示,如果有新行后没有空格它甚至会匹配。如果你只想匹配换行符和空格,使用\ s + – jiggy 2011-04-13 19:39:46
不,你一定要'perl -0777 -pe's/\ R \ h +// g''。 – tchrist 2011-04-19 02:26:49