* @return the result as a BooleanValue, or null to indicate the empty sequence
* @throws XPathException on an error
*/
public Item evaluateItem(XPathContext c) throws XPathException {
AtomicValue sv0 = (AtomicValue)argument[0].evaluateItem(c);
if (sv0==null) return null;
Pattern re = regexp;
if (re == null) {
AtomicValue pat = (AtomicValue)argument[1].evaluateItem(c);
if (pat==null) return null;
String flags;
if (argument.length==2) {
flags = "";
} else {
AtomicValue sv2 = (AtomicValue)argument[2].evaluateItem(c);
if (sv2==null) return null;
flags = sv2.getStringValue();
}
try {
String javaRegex = RegexTranslator.translate(
pat.getStringValue(), true);