From: "trans. (T. Onoma)" Date: 2004-12-28T07:04:32+09:00 Subject: Re: Paragraph mode (was: split on '' (and another for split -1)) On Monday 27 December 2004 04:48 pm, Carlos wrote: | ["trans. (T. Onoma)" , 2004-12-27 22.25 CET] | | > A more informative explanation of this "paragraph mode" might actually be | > helpful. | | require 'pp' | | $/="" | pp <<'EOT'.to_a | | A line feed separates lines. For example this one -> | <- divides these two lines. Two or more line feeds | separate paragraphs (that is, the regular expression | /\n\n+/). Here ends the first paragraph: | | And here begins the second. | | Third. | | | Fourth. | EOT | | => | ["\nA line feed separates lines. For example this one ->\n<- divides these | two lines. Two or more line feeds\nseparate paragraphs (that is, the | regular expression\n/\\n\\n+/). Here ends the first paragraph:\n\n", | "And here begins the second.\n\n", | "Third.\n\n\n", | "Fourth.\n"] | | Good luck. Thanks, Carlos. T.