Rosetta Problems

Dancing stars on regular expression!

https://atcoder.jp/contests/ttpc2015/tasks/ttpc2015_p