in reply to Extract paragraph from multi line string
One 'problem' with reading input in 'paragrep' mode (i.e., $/ = "") is that a seemingly blank line that has any other whitespace in it (e.g., "\n \n") is not recognized as being a repeated newline. A repeated newline, and therefor a paragraph break, exactly matches /\n\n+/ only.
BTW: I get the same printed output from `cat file` as kennethk.
|
|---|