fix for parse_region function ('end of string' should be at the end of each regex')