fix greedy search in get_id_string_from_xml_str