Regex to Class Router