docs: protected Pattern translateMaskIntoRegex(FacesContext context, String mask) {
          StringBuilder regex = SharedStringBuilder.get(context, SB_PATTERN);
          boolean optionalFound = false;
  
          for (char c : mask.toCharArray()) {
              if (c == '?') {
                  optionalFound = true;
              }
              else {
                  regex.append(translateMaskCharIntoRegex(c, optionalFound));
              }
          }
          return Pattern.compile(regex.toString());
      }