try {
final Platform platform = Configuration.getPlatform();
final CharSequence regex = ((StringLiteral)this.regex).getStringValue();
final CharSequence flagstr = ((StringLiteral)flags).getStringValue();
final int xmlVersion = getConfiguration().getXMLVersion();
pattern = platform.compileRegularExpression(
regex, xmlVersion, RegularExpression.XPATH_SYNTAX, flagstr);
if (pattern.matches("")) {
invalidRegex("The regular expression must not be one that matches a zero-length string", "XTDE1150");
}