/** * Get a compiled representation of the regexp pattern * @param options the options * @return the compiled pattern * @throws BuildException on error */ protected Pattern getCompiledPattern(final int options) throws BuildException { try { // compute the compiler options based on the input options first return compiler.compile(pattern, getCompilerOptions(options)); } catch (final Exception e) { throw new BuildException(e); } }