Convert regexes to structs