@Override
  public @Nullable String getErrorMessage(@Nullable Project project, @NotNull String string) {
    try {
      Pattern.compile(string);
    }
    catch (PatternSyntaxException e) {
      return StringUtil.substringBefore(e.getMessage(), "\n");
    }
    return null;
  }
@Override
  public @Nullable String getErrorMessage(@Nullable Project project, @NotNull String string)