The name of the JQL function is versionMatchRegex.
It takes one parameter type of string which contains a regular expression.
It works with all issue fields that represent Project Version. Default JIRA's version fields are Fix Version/s (JQL fixVersion) and Affects Version/s (JQL affectsVersion).
Example of usage:
fixVersion in versionMatchRegex("ReleaseOfYear20[0-9]{2}-(patch|fix)-[0-9]{1}")