protected Pattern translateMaskIntoRegex(FacesContext context, String mask) {
        StringBuilder regex = SharedStringBuilder.get(context, SB_PATTERN);
        return translateMaskIntoRegex(regex, mask);
    }
Translates the client side mask to to a {@link Pattern} base on:
https://github.com/RobinHerbots/Inputmask
a - Represents an alpha character (A-Z,a-z)
A - Represents an UPPERCASE alpha character (A-Z)
9 - Represents a numeric character (0-9)
* - Represents an alphanumeric character (A-Z,a-z,0-9)
[] - Makes the input in between [ and ] optional

@param context the FacesContext instance, used to retrieve a shared StringBuilder.
@param mask the mask pattern to translate into a regular expression.
@return the translated regular expression as a {@link Pattern}.
primefaces/src/main/java/org/primefaces/component/inputmask/InputMaskRenderer.java