public static APIVersion apiParseVersion(String version, String prefix) {
        String pattern = "([0-9]+)[.]([0-9]+)([.]\\S+)?\\s*(.+)?";
        if (prefix != null) {
            pattern = prefix + "\\s+" + pattern;
        }

        Matcher matcher = Pattern.compile(pattern).matcher(version);
        if (!matcher.matches()) {
            throw new IllegalArgumentException(String.format("Malformed API version string [%s]", version));
        }

        return new APIVersion(
                Integer.parseInt(matcher.group(1)),
                Integer.parseInt(matcher.group(2)),
                matcher.group(3),
                matcher.group(4)
        );
    }
Parses a version string. The version string must have the format
{@code PREFIX MAJOR.MINOR.REVISION IMPL}, where {@code PREFIX} is the
specified prefix (string, optional), {@code MAJOR} is the major version
(integer), {@code MINOR} is the minor version (integer), {@code REVISION}
is the revision version (string, optional) and {@code IMPL} is
implementation-specific information (string, optional).

@param version the version string
@param prefix the version string prefix, may be null

@return the parsed {@link APIVersion}
jme3-lwjgl3/src/main/java/com/jme3/lwjgl3/utils/APIUtil.java