small regex refactor