We should check for invalid regexps here because this is a user preference.