FileDocCategorySizeDatePackage
REUtil.javaAPI DocJava SE 6 API2174Tue Jun 10 00:22:24 BST 2008com.sun.org.apache.regexp.internal

REUtil

public class REUtil extends Object
This is a class that contains utility helper methods for this package.
author
Jonathan Locke
version
$Id: REUtil.java,v 1.1.2.1 2005/08/01 00:02:56 jeffsuttor Exp $

Fields Summary
private static final String
complexPrefix
complex:
Constructors Summary
Methods Summary
public static REcreateRE(java.lang.String expression, int matchFlags)
Creates a regular expression, permitting simple or complex syntax

param
expression The expression, beginning with a prefix if it's complex or having no prefix if it's simple
param
matchFlags Matching style flags
return
The regular expression object
exception
RESyntaxException thrown in case of error

    
                                                       
            
    
        if (expression.startsWith(complexPrefix))
        {
            return new RE(expression.substring(complexPrefix.length()), matchFlags);
        }
        return new RE(RE.simplePatternToFullRegularExpression(expression), matchFlags);
    
public static REcreateRE(java.lang.String expression)
Creates a regular expression, permitting simple or complex syntax

param
expression The expression, beginning with a prefix if it's complex or having no prefix if it's simple
return
The regular expression object
exception
RESyntaxException thrown in case of error

        return createRE(expression, RE.MATCH_NORMAL);