You could make use of `text.regex.Pattern`, see http://xp-framework.github.com/docs/core-5.9.0-SNAPSHOT-apidoc/text/regex/Pattern.html