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();
}
}
}
|