Date: Tue, 28 Sep 2004 10:59:23 -0700 From: Gary Kline <kline@tao.thought.org> To: Fabian Keil <freebsd-listen@fabiankeil.de> Cc: freebsd-questions@freebsd.org Subject: Re: regex replacement wizard advice needed Message-ID: <20040928175923.GC2525@thought.org> In-Reply-To: <200409281253.12887.freebsd-listen@fabiankeil.de> References: <20040927192859.GA82254@thought.org> <200409281253.12887.freebsd-listen@fabiankeil.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 28, 2004 at 12:53:12PM +0200, Fabian Keil wrote: > On Monday 27 September 2004 21:28, Gary Kline wrote: > [[ ... ]] > > <B>747</B><BR> > > Paragraph747. > > I'd rather take something like: > > (echo "<html><head><title>Title</title></head><body><h1>Title</h1><ol>"; > perl -n -e 's@^\d+\s+(.*$)@<li><p>$1</p></li>@;print' input.txt; > echo "</ol></body></html>") >output.html > > Without the line breaks, of course. > This might be closer, plugging in your ";print" and Tom's regex, since the doc is plaintext, maybe ASCII. But then I'll want to put <P> or <BR> tags before each (\d+) line. Your echo lines are great for turning text into HTML; save some typing. Thanks for the idea. gary > Semantic markup and valid HTML 2.0. > > Regards > Fabian > > > > > -- Gary Kline kline@thought.org www.thought.org Public service Unix
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040928175923.GC2525>