Package org.apache.oro.text.perl

Examples of org.apache.oro.text.perl.Perl5Util.match()


    public static boolean matchRegexp(String value, String regexp) {
        boolean match = false;

        if (regexp != null && regexp.length() > 0) {
            Perl5Util r = new Perl5Util();
            match = r.match(getDelimittedRegexp(regexp), value);
        }

        return match;
    }
View Full Code Here


            Perl5Util matchAsciiPat = new Perl5Util();

            boolean ipAddress = false;
            boolean symbolic = false;

            if (!matchAsciiPat.match(legalAsciiPat, value)) {
                return false;
            }

            // Check the whole email address structure
            bValid = matchEmailPat.match(emailPat, value);
View Full Code Here

        {
            return false;
        }

        Perl5Util matchAsciiPat = new Perl5Util();
        if ( !matchAsciiPat.match( LEGAL_ASCII_PATTERN, email ) )
        {
            return false;
        }

        // Check the whole email address structure
View Full Code Here

            return false;
        }

        // Check the whole email address structure
        Perl5Util emailMatcher = new Perl5Util();
        if ( !emailMatcher.match( EMAIL_PATTERN, email ) )
        {
            return false;
        }

        if ( email.endsWith( "." ) )
View Full Code Here

    protected boolean isValidDomain( String domain )
    {
        boolean symbolic = false;
        Perl5Util ipAddressMatcher = new Perl5Util();

        if ( ipAddressMatcher.match( IP_DOMAIN_PATTERN, domain ) )
        {
            if ( !isValidIpAddress( ipAddressMatcher ) )
            {
                return false;
            }
View Full Code Here

        }
        else
        {
            // Domain is symbolic name
            Perl5Util domainMatcher = new Perl5Util();
            symbolic = domainMatcher.match( DOMAIN_PATTERN, domain );
        }

        if ( symbolic )
        {
            if ( !isValidSymbolicDomain( domain ) )
View Full Code Here

     * Returns true if the user component of an email address is valid.
     */
    protected boolean isValidUser( String user )
    {
        Perl5Util userMatcher = new Perl5Util();
        return userMatcher.match( USER_PATTERN, user );
    }

    /**
     * Validates an IP address. Returns true if valid.
     */
 
View Full Code Here

        int i = 0;
        Perl5Util atomMatcher = new Perl5Util();

        while ( match )
        {
            match = atomMatcher.match( ATOM_PATTERN, domain );
            if ( match )
            {
                domainSegment[i] = atomMatcher.group( 1 );
                int l = domainSegment[i].length() + 1;
                domain =
View Full Code Here

        value = replace( value, " ", "%20" );

        Perl5Util matchUrlPat = new Perl5Util();
        Perl5Util matchAsciiPat = new Perl5Util();

        if ( !matchAsciiPat.match( LEGAL_ASCII_PATTERN, value ) )
        {
            return false;
        }

        // Check the whole url address structure
View Full Code Here

        {
            return false;
        }

        Perl5Util schemeMatcher = new Perl5Util();
        if ( !schemeMatcher.match( SCHEME_PATTERN, scheme ) )
        {
            return false;
        }

        if ( this.options.isOff( ALLOW_ALL_SCHEMES ) )
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.