Second submit :

* replace regexp by a simpler one
* replace for(...) loop by map.reduce()