1 #!/bin/sh 2 3 cp syntax.txt syntax.wiki 4 sam -d syntax.wiki <<'!' 5 ,s!`!`````!g 6 ,s!== (([^()]|\([^()]*\))*)! `\1`!g 7 ,s!!`!g 8 ,s!!`!g 9 ,s! vim$! <font size="1">VIM</font>!g 10 ,s! pcre$! <font size="1">PCRE</font>!g 11 ,s! perl$! <font size="1">PERL</font>!g 12 ,s!(^[^ ]+) (.*)\n!`\1` \2\n!g 13 ,x g/NOT SUPPORTED/ s!^[^ ]+!<font color="#808080">&</font>! 14 ,s!NOT SUPPORTED!<font size="1">(&)</font>!g 15 ,s!(^[^ ]+) (.*)\n!<tr><td>\1</td><td>\2</td></tr>\n!g 16 ,s!.*:$!<b>&</b>!g 17 ,s!^$!<tr><td></td></tr>!g 18 ,x v/<tr>/ s!.*!<tr><td colspan="2">&</td></tr>! 19 1,2c 20 #summary I define UNIX as 30 definitions of regular expressions living under one roof. Don Knuth 21 22 <wiki:comment> 23 GENERATED BY mksyntaxwiki. DO NOT EDIT 24 </wiki:comment> 25 26 <table border="0" cellpadding="2" cellspacing="2"> 27 <tr><td colspan="2">This page lists the regular expression syntax accepted by RE2.</td></tr> 28 <tr><td colspan="2">It also lists syntax accepted by PCRE, PERL, and VIM.</td></tr> 29 <tr><td colspan="2">Grayed out expressions are not supported by RE2.</td></tr> 30 . 31 $a 32 </table> 33 . 34 w 35 q 36 ! 37