6 H; s;^(.*)--].*$;\1-->;p;
7 g; s;^.*--]([^\n]*)$;\1;
8 x; s;^</!-->\n(.*)\n[^\n]*$;\1;; x;
17 s;\[hidden[ \t]+"([^"]*)"[ \t]+"([^"]*)";[input type="hidden" name="\1" value="\2";g;
18 s;\[checkbox[ \t]+"([^"]*)"[ \t]+"([^"]*)";[input type="checkbox" name="\1" value="\2";g;
19 s;\[radio[ \t]+"([^"]*)"[ \t]+"([^"]*)";[input type="radio" name="\1" value="\2";g;
20 s;\[submit[ \t]+"([^"]*)"[ \t]+"([^"]*)";[button type="submit" name="\1" value="\2";g;
21 s;\[a[ \t]+"([^"]*)";[a href="\1";g;
22 s;\[img[ \t]+"([^"]*)"[ \t]+"([^"]*)";[img src="\1" alt="\2";g;
24 s;\[!([^]\[]*)\];<!\1>;g;
25 s;\[!--([^]\[]*)--\];<!--\1-->;g;
28 s;\[([^]\[< \t]+)([^]\[]*)\];<\1>\2</\1>;g;
33 s;^([^]\n]*)\]([^\n]*)\n([^\n]+);\1\3\2;
35 h; s;^([^\n]*)\n;;; x; s;\n.*$;;;
38 s;^([^\[\n]*)\[([^]\[< \t\n]+)([^\n]*);\1<\2>\3\n</\2>;
40 G; h; s;^[^\n]*\n+;;; x; s;\n.*$;;;
43 s;class="([^>]+)>[ \t]*\.([^< \t]+);class="\2 \1>;g; t attribs;
44 s;(<[^/][^>]*)>[ \t]*\.([^< \t]+);\1 class="\2">;g;
45 s;(<[^/][^>]*)>[ \t]*#([^< \t]+);\1 id="\2">;g;
46 s;(<[^/][^>]*)>[ \t]*([^ \t=<]+=("[^"]*"|'[^']*'|[^< \t]*));\1 \2>;g;
48 s;(<input ([^>]+ )?type=(radio|"radio"|'radio')( [^>]+)?)>[ \t]*(checked|selected);\1 checked="checked">;g;
49 s;(<input ([^>]+ )?type=(checkbox|"checkbox"|'checkbox')( [^>]+)?)>[ \t]*(checked|selected);\1 checked="checked">;g;
50 s;(<option( [^>]+)?)>[ \t]*(checked|selected);\1 selected="selected">;g;
51 s;(<select( [^>]+)?)>[ \t]*multiple;\1 multiple="multiple">;g;
54 s;(<[^/][^>]*>)[ \t]*;\1;g;
55 s;(<[^/][^>]*)>[ \t]*</[^>]+>;\1/>;g;