我怎麼能寫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