Developer's Daily Java Education - Test Projects
  front page | java | perl | unix | DevDirectory
   
Front Page
Java
Education
   
 



import org.apache.oro.text.regex.Perl5Compiler;
import org.apache.oro.text.regex.PatternCompiler;
import org.apache.oro.text.regex.MalformedPatternException;
import org.apache.oro.text.regex.Pattern;


public class Main
{
  public static void main(String args[])
  {
    PatternCompiler compiler = new Perl5Compiler();
    Pattern pattern = null;
    try
    {
      pattern = compiler.compile("t[aeio]n");
      //pattern=compiler.compile("t[aeio]n",Perl5Compiler.CASE_INSENSITIVE_MASK);
    }
    catch (MalformedPatternException e)
    {
      e.printStackTrace();
    }
  }
}
Copyright © 1998-2003 DevDaily Interactive, Inc.
All Rights Reserved.