src/com/sun/org/apache/regexp/internal/REUtil.java

changeset 2116
aaee9ae4799a
parent 2090
3b8ebb957957
parent 2115
ba503169016f
child 2117
a5f920b6d2b5
     1.1 --- a/src/com/sun/org/apache/regexp/internal/REUtil.java	Sat Oct 24 16:18:47 2020 +0800
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,61 +0,0 @@
     1.4 -/*
     1.5 - * reserved comment block
     1.6 - * DO NOT REMOVE OR ALTER!
     1.7 - */
     1.8 -/*
     1.9 - * Copyright 1999-2004 The Apache Software Foundation.
    1.10 - *
    1.11 - * Licensed under the Apache License, Version 2.0 (the "License");
    1.12 - * you may not use this file except in compliance with the License.
    1.13 - * You may obtain a copy of the License at
    1.14 - *
    1.15 - *     http://www.apache.org/licenses/LICENSE-2.0
    1.16 - *
    1.17 - * Unless required by applicable law or agreed to in writing, software
    1.18 - * distributed under the License is distributed on an "AS IS" BASIS,
    1.19 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    1.20 - * See the License for the specific language governing permissions and
    1.21 - * limitations under the License.
    1.22 - */
    1.23 -
    1.24 -package com.sun.org.apache.regexp.internal;
    1.25 -
    1.26 -/**
    1.27 - * This is a class that contains utility helper methods for this package.
    1.28 - *
    1.29 - * @author <a href="mailto:jonl@muppetlabs.com">Jonathan Locke</a>
    1.30 - */
    1.31 -public class REUtil
    1.32 -{
    1.33 -    /** complex: */
    1.34 -    private static final String complexPrefix = "complex:";
    1.35 -
    1.36 -    /**
    1.37 -     * Creates a regular expression, permitting simple or complex syntax
    1.38 -     * @param expression The expression, beginning with a prefix if it's complex or
    1.39 -     * having no prefix if it's simple
    1.40 -     * @param matchFlags Matching style flags
    1.41 -     * @return The regular expression object
    1.42 -     * @exception RESyntaxException thrown in case of error
    1.43 -     */
    1.44 -    public static RE createRE(String expression, int matchFlags) throws RESyntaxException
    1.45 -    {
    1.46 -        if (expression.startsWith(complexPrefix))
    1.47 -        {
    1.48 -            return new RE(expression.substring(complexPrefix.length()), matchFlags);
    1.49 -        }
    1.50 -        return new RE(RE.simplePatternToFullRegularExpression(expression), matchFlags);
    1.51 -    }
    1.52 -
    1.53 -    /**
    1.54 -     * Creates a regular expression, permitting simple or complex syntax
    1.55 -     * @param expression The expression, beginning with a prefix if it's complex or
    1.56 -     * having no prefix if it's simple
    1.57 -     * @return The regular expression object
    1.58 -     * @exception RESyntaxException thrown in case of error
    1.59 -     */
    1.60 -    public static RE createRE(String expression) throws RESyntaxException
    1.61 -    {
    1.62 -        return createRE(expression, RE.MATCH_NORMAL);
    1.63 -    }
    1.64 -}

mercurial