Re: Classic text problem: matching consecutive newlines

2002-07-31 Thread Steve Grazzini
John W. Krahn <[EMAIL PROTECTED]> wrote: > Steve Grazzini wrote: >> >> #!/usr/bin/perl -pi~ -0777 >> # [untested:] >> >> s{ /s*? /n (\s*) } > ^^ ^^ > s{ \s*? \n (\s*) } > > >> { $1 =~ tr/\n // ? "\n" : " " }xeg ^ You missed one ;) (drat!) -- Steve perldoc -qa.j

Re: Classic text problem: matching consecutive newlines

2002-07-30 Thread John W. Krahn
Steve Grazzini wrote: > > Kevin Zembower <[EMAIL PROTECTED]> wrote: > > I'm facing what I believe to one of the classic text manipulation > > problems, transforming a document which was typed with a hard return > > at the end of every physical line, and two consecutive newlines to > > mark the en

Re: Classic text problem: matching consecutive newlines

2002-07-30 Thread Steve Grazzini
Kevin Zembower <[EMAIL PROTECTED]> wrote: > I'm facing what I believe to one of the classic text manipulation > problems, transforming a document which was typed with a hard return > at the end of every physical line, and two consecutive newlines to > mark the end of a paragraph. > > Would anyo

Re: Classic text problem: matching consecutive newlines

2002-07-29 Thread John W. Krahn
Kevin Zembower wrote: > > I'm facing what I believe to one of the classic text manipulation > problems, transforming a document which was typed with a hard return at > the end of every physical line, and two consecutive newlines to mark the > end of a paragraph. > > Would anyone help me write a

Re: Classic text problem: matching consecutive newlines

2002-07-29 Thread Janek Schleicher
Kevin Zembower wrote at Mon, 29 Jul 2002 17:19:46 +0200: > I'm facing what I believe to one of the classic text manipulation problems, >transforming a > document which was typed with a hard return at the end of every physical line, and >two consecutive > newlines to mark the end of a paragraph.

Re: Classic text problem: matching consecutive newlines

2002-07-29 Thread Jeff 'japhy' Pinyan
On Jul 29, KEVIN ZEMBOWER said: >Would anyone help me write a program which would transform these >documents? I'm trying to find all instances of a single newline, and >remove it, either inserting or removing space characters around where it >was to leave just one space between what was the two l

Re: Classic text problem: matching consecutive newlines

2002-07-29 Thread Jeff 'japhy' Pinyan
On Jul 29, KEVIN ZEMBOWER said: >I'm facing what I believe to one of the classic text manipulation >problems, transforming a document which was typed with a hard return at >the end of every physical line, and two consecutive newlines to mark the >end of a paragraph. > >Would anyone help me write

Re: Classic text problem: matching consecutive newlines

2002-07-29 Thread Jenda Krynicky
From: "KEVIN ZEMBOWER" <[EMAIL PROTECTED]> > I'm facing what I believe to one of the classic text manipulation > problems, transforming a document which was typed with a hard return > at the end of every physical line, and two consecutive newlines to > mark the end of a paragraph. > > Would anyo

Classic text problem: matching consecutive newlines

2002-07-29 Thread KEVIN ZEMBOWER
I'm facing what I believe to one of the classic text manipulation problems, transforming a document which was typed with a hard return at the end of every physical line, and two consecutive newlines to mark the end of a paragraph. Would anyone help me write a program which would transform these d