1 i\
<html>\
<head>\
<title></title>\
<style>\
</style>\
</head>\
<body>\
<table border="1"\
       bordercolor="black"\
       summary="title icon">\
<tr>\
 <td bgcolor="black">\
 <font color="white">B</font>\
 </td>\
 <td>umble</td>\
\
</tr>\
</table>
#l;
#s@.$@@g
#
s@\([ ][ ]*\)@ @g
#-- title
s@^[ ]*==\(.*\)@<h2>\1</h2>@
#-- headings
s@^[ ]*\*\(.*\)@<h3>\1</h3>@
#-- files
s@ \(/[^ /][^ /]*/[^ ]*\)@ <tt>\1</tt>@g
#-- special links
#-- format: "location" (googlemap)
s@"\([^"][^"]*\)"[ ]*(maplink)@<a href="http://maps.google.com/maps?hl=au\&q=\1">\1</a>@g
s@"\([^"][^"]*\)"[ ]*(googlemap)@<a href="http://maps.google.com/maps?hl=au\&q=\1">\1</a>@g
#-- format: "term" (wikipedia)
s@"\([^"][^"]*\)"[ ]*(google)@<a href="http://www.google.com/search?q=\1">\1</a>@g
s@"\([^"][^"]*\)"[ ]*(wikipedia)@<a href="http://en.wikipedia.org/wiki/Special:Search?search=\1">\1</a>@g
s@"\([^"][^"]*\)"[ ]*(wpsearch)@<a href="http://en.wikipedia.org/wiki/Special:Search?search=\1">\1</a>@g

#-- format: "term" (wikipedia:es)
s@"\([^"][^"]*\)"[ ]*(wikipedia:\([a-z][a-z]\))@<a href="http://\2.wikipedia.org/wiki/Special:Search?search=\1">\1</a>@g
s@"\([^"][^"]*\)"[ ]*(google:\([a-z][a-z]\))@<a href="http://www.google.com/search?hl=\2\&q=\1">\1</a>@g
 
#-- links
s@"\([^"][^"]*\)" [ ]*link://\([^ ][^ ]*\)@<a href="\2">\1</a>@g
s@"\([^"][^"]*\)" [ ]*file://\([^ ][^ ]*\)@<a href="\2">\1</a>@g
s@"\([^"][^"]*\)" [ ]*\(http://[^ ][^ ]*\)@<a href="\2">\1</a>@g
s@"\([^"][^"]*\)" [ ]*\(ftp://[^ ][^ ]*\)@<a href="\2">\1</a>@g
s@"\([^"][^"]*\)" [ ]*\(www\.[^ ][^ ]*\)@<a href="http://\2">\1</a>@g

s@ file://\([^ ][^ ]*\)@ <a href="\1">\1</a>@g
s@^file://\([^ ][^ ]*\)@ <a href="\1">\1</a>@g
s@ link://\([^ ][^ ]*\)@ <a href="\1">\1</a>@g
s@^link://\([^ ][^ ]*\)@ <a href="\1">\1</a>@g
s@ \(http://[^ ][^ ]*\)@ <a href="\1">\1</a>@g
s@^\(http://[^ ][^ ]*\)@<a href="\1">\1</a>@g
s@ \(ftp://[^ ][^ ]*\)@ <a href="\1">\1</a>@g
s@^\(ftp://[^ ][^ ]*\)@<a href="\1">\1</a>@g
s@ \(gopher://[^ ][^ ]*\)@ <a href="\1">\1</a>@g
s@^\(gopher://[^ ][^ ]*\)@<a href="\1">\1</a>@g
s@ \(www\.[^ ][^ ]*\)@ <a href="http://\1">\1</a>@g
s@^\(www\.[^ ][^ ]*\)@<a href="http://\1">\1</a>@g

s@-->@\&rarr;@g
s@<--@\&larr;@g

#--------------------------
#-- lists

#-- unordered lists
/^[ ]*u-/,/^[ ]*$/ {
  s@^\([ ]*\)u-@\1<ul><li>@;
  s@^\([ ]*\)-@\1<li>@;
  s@^\([ ]*\)$@\1</ul>\
  @;
}

#-- ordered lists
/^[ ]*o-/,/^[ ]*$/ {
  s@^\([ ]*\)o-@\1<ol><li>@;
  s@^\([ ]*\)-@\1<li>@;
  s@^\([ ]*\)$@\1</ol>\
  @;
}

#-- definition lists
/^[ ]*d-/,/^[ ]*$/ {
  s@^\([ ]*\)d-@\1<dl><dt>@;
  s@^\([ ]*\)-@\1<dt>@;
  s@^\([ ]*\)+@\1<dd>@;
  s@^\([ ]*\)$@\1</dl>\
  @;
}

#-- faq lists
/^[ ]*(faq)/,/^[ ]*(\/faq)/ {
  s@^\([ ]*\)(faq)@\1<dl>@;
  s@^\([ ]*\)q:@\1<dt>@;
  s@?@?<dd>@;
  s@^\([ ]*\)(/faq)@\1</dl>@;
}

#-- journal
/^[ ]*(jour)/,/^[ ]*(\/jour)/ {
  s@^\([ ]*\)(jour)@\1<dl>@;
  s@^\([ ]*\)\([0-9][0-9].*\)@\1<dt>\2<dd>@;
  s@^\([ ]*\)(/jour)@\1</dl>@;
}

s@^\([ ]*\)$@<p>@g;

$ a\
\
</body>\
</html>