Hi all I am trying to find a pattern match in another String using a AWK Compiler. Actually i want to use the AwkStreamInput class so that i can search for a string in an input stream. But wanted to try out a simple example first and cant get it to work. I always get a false result indicating that the pattern could not be found in the input string. Do not know what i'm missing here.
Here is the code snippet: AwkMatcher awkMatcher = new AwkMatcher(); AwkCompiler awkCompiler = new AwkCompiler(); try { String testString = "This is a test for Draft"; Pattern pattern = awkCompiler.compile("/Draft/"); boolean found = awkMatcher.contains(testString,pattern); System.out.println("What is Value of found:" + found ); } catch ( MalformedPatternException me) { me.printStackTrace(); } Any help is greatly appreciated Thanks Sujatha Sujatha Sridhar System Architect YOUcentric, Inc (Soon to be a part of J.D. Edwards) P: 704.643.1000 Extn 3058 F: 704.401.1240 [EMAIL PROTECTED]