SONAR-3644 Add checks for invalid regexps