(n.b http://xkcd.com/323/ )
I woke up with my terminal filled with sed scripts like this one:
/<div class="maple">/,/<\/div>/ { s/<.*>/ /g s/>/ /g s/\((.*\)\n\(*.*)\)\(:\|;\)/\1\2/g s/[1-9]/ /g s/\-//g s/\(\#.*\)$/ /g s/([^()])/ /g s/{[^()]}/ /g s/\[[^()]\]//g s/\w*\s*:=/ /g s/\w*\s*=/ /g s/[:;=+&^$"'{}\*\\\/]/ /g s/\[\|\]/ /g s/^\(\n\)*/\1/ /\w*(/{ s/,\{0,\}\(\w\|[^()]\)*\(\,\|)\|\n\|\s\)/ /g s/^\(\n\)*/\1/ s/\(\w*\)(/\1\n/g s/ *//g p } s/\s.\s//g s/\s..\s//g }
… wich, (un)surprisingly works.
Still don’t know how nor why it does. I guess it’s time for more python.