code: 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());
      }
docs: Translates the client side mask to to a {@link Pattern} base on:
  https://github.com/digitalBush/jquery.maskedinput
  a - Represents an alpha character (A-Z,a-z)
  9 - Represents a numeric character (0-9)
  * - Represents an alphanumeric character (A-Z,a-z,0-9)
  ? - Makes the following input optional
  
  @param context   The {@link FacesContext}
  @param mask The mask value of component
  @return The generated {@link Pattern}