refine map_regex_table method