Can we make this an array of regexes to make it more maintainable?