private static @Nullable BeforeAfter<String> getBeforeAfterAroundWildCards(final @NotNull String pattern) {
    final int firstIdx = pattern.indexOf('*');
    final int lastIdx = pattern.lastIndexOf('*');
    if (firstIdx < 0 || lastIdx < 0) return null;
    return new BeforeAfter<>(pattern.substring(0, firstIdx), pattern.substring(lastIdx + 1));
  }
private static @Nullable BeforeAfter<String> getBeforeAfterAroundWildCards(final @NotNull String pattern)