We have regex in 2 places. One of them here which specifies rules for a machine_tag and the other inside query to validate the tags passed in the query. Both these regexes differ only slightly.