* Compile the pattern in a <code>org.apache.regexp.REProgram</code>.
*/
public Object preparePattern(String pattern) throws PatternException {
try {
RECompiler compiler = new RECompiler();
REProgram program = compiler.compile(pattern);
return program;
} catch (RESyntaxException rse) {
getLogger().debug("Failed to compile the pattern '" + pattern + "'", rse);
throw new PatternException(rse.getMessage(), rse);