Copy EReg from wiki, still work to do: review, check, add info on "map" method