Package client.net.sf.saxon.ce.regex

Examples of client.net.sf.saxon.ce.regex.ARegularExpression.matches()


        }

        try {
            ARegularExpression re = new ARegularExpression(arg1.getStringValueCS(), flags.toString(), "XP20", null);
            // check that it's not a pattern that matches ""
            if (re.matches("")) {
                dynamicError(
                        "The regular expression in replace() must not be one that matches a zero-length string",
                        "FORX0003", c);
            }
            String input = arg0.getStringValue();
View Full Code Here


        try {
            ARegularExpression re = new ARegularExpression(pattern, flags.toString(), "XP20", null);

            // check that it's not a pattern that matches ""
            if (re.matches("")) {
                dynamicError("The regular expression in tokenize() must not be one that matches a zero-length string", "FORX0003", null);
            }

            return re.tokenize(input);
View Full Code Here

    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);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.