private RegexIterator getRegexIterator(XPathContext context) throws XPathException {
CharSequence input = select.evaluateAsString(context);
String flagstr = flags.evaluateAsString(context).toString();
ARegularExpression re = new ARegularExpression(regex.evaluateAsString(context), flagstr, "XP20", null);
if (re.matches("")) {
dynamicError("The regular expression must not be one that matches a zero-length string",
"XTDE1150", context);
}
return re.analyze(input);