org.apache.xerces.impl.xpath.regex

Class REUtil


public final class REUtil
extends java.lang.Object

Version:
$Id: REUtil.java 320091 2004-10-04 22:07:41Z mrglavas $

Method Summary

static RegularExpression
createRegex(String pattern, String options)
Creates a RegularExpression instance.
static void
main(String[] argv)
Sample entry.
static boolean
matches(String regex, String target)
static boolean
matches(String regex, String options, String target)
static String
quoteMeta(String literal)

Method Details

createRegex

public static RegularExpression createRegex(String pattern,
                                            String options)
            throws ParseException
Creates a RegularExpression instance. This method caches created instances.
See Also:
RegularExpression.RegularExpression(java.lang.String, java.lang.String)

main

public static void main(String[] argv)
Sample entry.
Usage: org.apache.xerces.utils.regex.REUtil <regex> <string>

matches

public static boolean matches(String regex,
                              String target)
            throws ParseException
See Also:
RegularExpression.matches(java.lang.String)

matches

public static boolean matches(String regex,
                              String options,
                              String target)
            throws ParseException
See Also:
RegularExpression.matches(java.lang.String)

quoteMeta

public static String quoteMeta(String literal)

Copyright B) 1999-2006 The Apache Software Foundation. All Rights Reserved.