regex replacement wizard advice needed
kline at tao.thought.org
Tue Sep 28 10:59:35 PDT 2004
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.
> Semantic markup and valid HTML 2.0.
Gary Kline kline at thought.org www.thought.org Public service Unix
More information about the freebsd-questions