Package org.apache.regexp

Examples of org.apache.regexp.RE.match()


        final String s = url.toString();
        Iterator i = excludeCrawlingURL.iterator();
        while (i.hasNext()) {
            RE pattern = (RE) i.next();
            if (pattern.match(s)) {
                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("Excluded URL " + url);
                }
                return true;
            }
View Full Code Here


        final String s = url.toString();
        Iterator i = includeCrawlingURL.iterator();
        while (i.hasNext()) {
            RE pattern = (RE) i.next();
            if (pattern.match(s)) {
                if (getLogger().isDebugEnabled()) {
                    getLogger().debug("Included URL " + url);
                }
                return true;
            }
View Full Code Here

            if (!"".equals (regex)) {
                getLogger().debug ("VALIDATOR: string parameter " + name +
                        " should match regexp \"" + regex + "\"" );
                try {
                    RE r = new RE ( regex );
                    if ( !r.match(value) ) {
                        getLogger().debug("VALIDATOR: and it does not match");
                        return new ValidatorActionHelper ( value, ValidatorActionResult.NOMATCH);
                    };
                } catch ( RESyntaxException rese ) {
                    getLogger().error ("VALIDATOR: string parameter " + name +
View Full Code Here

                }

                //check for an re search
                matchFound = false;
                background = "";
                if (regularExpressionSearch != null && regularExpressionSearch.match(temp)) {
                    matchFound = true;
                    if (highlightSearch) {
                        background = " bgcolor=\"#00ffff\"";
                    }
                }
View Full Code Here

        List<String> files = consumer.getDepotfiles();
        RE re = new RE( "([^#]+)#\\d+ - ([^ ]+) .*" );
        for ( Iterator<String> it = files.iterator(); it.hasNext(); )
        {
            String filepath = it.next();
            if ( !re.match( filepath ) )
            {
                System.err.println( "Skipping " + filepath );
                continue;
            }
            String path = re.getParen( 1 );
View Full Code Here

            String lastChangelistStr = "";
            while ( ( line = br.readLine() ) != null )
            {
                getLogger().debug( "Consuming: " + line );
                RE changeRegexp = new RE( "Change (\\d+)" );
                if ( changeRegexp.match( line ) )
                {
                    lastChangelistStr = changeRegexp.getParen( 1 );
                }
            }
            br.close();
View Full Code Here

                }

                //increase order
                order++;
            }
        } else if (query.match(url)) {

            logger.debug("Query pattern [" + url + "]");

            // Don't do anything in here
            rootStatusCode = HttpServletResponse.SC_OK;
View Full Code Here

                logger.error("Pattern trying to use: " +
                             repository.getPattern());
            }


            if (queryHostRE.match(url)) {
                logger.debug("Query AuthZ");
                statusCode = HttpServletResponse.SC_OK;
                patternMatch = true;
            } else {
                if (authZHost.match(url)) {
View Full Code Here

            if (!rootIDExists) {
                RE internalRE =
                    new RE(new URL(internalURL).getHost(), RE.MATCH_CASEINDEPENDENT);
                boolean samePorts =
                    (((new URL(internalURL)).getPort()) == ((new URL(url)).getPort()));
                if ((internalRE.match(url)) && (samePorts)) {
                    logger.debug("This is an internal URL");
                    statusCode = HttpServletResponse.SC_OK;
                } else {
                    logger.debug("No pattern has been defined at any repository for this URL");
                    //Set Status Code equal to "-1", so we do know there was no pattern found
View Full Code Here

            // Read pattern
            filter = (RE)e.nextElement();

            // Match patterns
            if (filter.match(url)) {

                // Debug
                if (logger.isDebugEnabled())
                    logger.debug("Filtered URL: [" + url + "]");
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.