Minor refactor of case insensitive toRegex test.