Hi, the thing is the ) character is kind of problematic, i have somethig like this:
String someText="context Cuenta:
epositar(monto
ouble):void pre checkDepositar: monto>999.999999";
String regexp = "^context \\)$"; //looking for the context and ending with )
PatternCompiler compiler=new Perl5Compiler();
try {
Pattern pattern=compiler.compile(regexp);
PatternMatcher matcher = new Perl5Matcher();
if(matcher.contains(texto, pattern)){
MatchResult result = matcher.getMatch();
System.out.println(result);
}
[ April 11, 2008: Message edited by: Jorge Bend ]