/*** * Create a new regular expression instance. * * @param p Project whose ant.regexp.regexpimpl property will be used. * @return the matcher * @throws BuildException on error */ public RegexpMatcher newRegexpMatcher(Project p) throws BuildException { String systemDefault; if (p == null) { systemDefault = System.getProperty(MagicNames.REGEXP_IMPL); } else { systemDefault = p.getProperty(MagicNames.REGEXP_IMPL); } if (systemDefault != null) { return createInstance(systemDefault); // TODO should we silently catch possible exceptions and try to // load a different implementation? } return new Jdk14RegexpMatcher(); }