Small refactor to make regex hit first.