code: @SuppressWarnings("null")
    public static boolean hasAnySelector(@NotNull SlingHttpServletRequest request, @NotNull String @NotNull... expectedSelectors) {
      String[] selectors = request.getRequestPathInfo().getSelectors();
      if (selectors != null && expectedSelectors != null) {
        for (String expectedSelector : expectedSelectors) {
          if (ArrayUtils.contains(selectors, expectedSelector)) {
            return true;
          }
        }
      }
      return false;
    }
docs: Checks if one of the given selectors is present in the current URL request (at any position).
  @param request Sling request
  @param expectedSelectors Selectors string to check for.
  @return true if the selector was found