org.comedia.util
Class CRegExp

java.lang.Object
  |
  +--org.comedia.util.CRegExp

public class CRegExp
extends java.lang.Object

Implements regular expressions algorithms. It allows unix grep-like pattern comparisons, for instance:

Usage examples:
 System.out.println("Match result: "
   + CRegExp.isMatch("[A-Z,_]*[A-Z,0-9,_]*0?7*", "LAB_001"));
 


Constructor Summary
CRegExp()
           
 
Method Summary
static boolean isMatch(java.lang.String pattern, java.lang.String text)
          Matches a text after star (any sequence).
static void main(java.lang.String[] args)
          Runs the test for this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRegExp

public CRegExp()
Method Detail

isMatch

public static boolean isMatch(java.lang.String pattern,
                              java.lang.String text)
Matches a text after star (any sequence).
Parameters:
pattern - a regular expression pattern.
text - a text to match.

main

public static void main(java.lang.String[] args)
Runs the test for this class.
Parameters:
args - a command line arguments.