do_all() { #echo $1 $2 re -cb -pl dot "$1" > $2.dot dot -Tpng $2.dot -o $2.png re -cb -pl c -k str "$1" > $2.c re -cb -pl json "$1" > $2.json } do_all "colou?r" "color" do_all "M(r|rs)\." Mr_Mrs do_all "(Net|Open|Free)BSD" BSD do_all "(miss|missus|mistress)" miss do_all "(s|S)t(even|ephen|eve|evie)" "steven" do_all "(dark|light)?(red|green|blue)(ish)?" "color2" do_all "(1|2|3|4|5|6|7|8|9|10|11|12)" "two_digit_number" do_all "(01|02|03|04|05|06|07|08|09|1|2|3|4|5|6|7|8|9|10|11|12)" "two_digit_number_zero" do_all "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)" month do_all "var1 +var2" "plus" do_all "var1[ \t]+var2" "plus_tab" do_all " *var1 *= *var2 *" "kleene" do_all "[ \t]*var1[ \t]*=[ \t]*var2[ \t]*" "kleene_tab" do_all "[ \t]*[a-z]+[ \t]*=[ \t]*[0-9]+[ \t]*" "config" do_all "(0|(1(01*0)*1))*" "divisible_by_3" do_all "(1|2|3|4|5|6|7|8|9|01|02|03|04|05|06|07|08|09|10|11|12):[0-5][0-9]:[0-5][0-9] (A|P)M" "AM_PM_time" do_all "(01|02|03|04|05|06|07|08|09|10|11|12):[0-5][0-9]:[0-5][0-9] (A|P)M" "AM_PM_time_2_digits" do_all "(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31)" "1_31" do_all "[0123][0-9]-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(19|20)[0-9]{2}" date0 do_all "[0123][0-9]-?(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-?(19|20)[0-9]{2}" date1 # nested! do_all "([0123][0-9]-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(19|20)[0-9]{2}|(19|20)[0-9]{2}-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-[0123][0-9])" date2 do_all "([0123][0-9]-?(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-?(19|20)[0-9]{2}|(19|20)[0-9]{2}-?(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-?[0123][0-9])" date3 do_all "([az]+ *,)+[az]+ *" CSV