1 package com.thaiopensource.datatype.xsd.regex; 2 3 /** 4 * A provider of a regular expression matching capability. 5 */ 6 public interface RegexEngine { 7 /** 8 * Compiles a string containing a regular expression into a <code>Regex</code> object. 9 * The <code>Regex</code> object can be used to test whether a string matches the regular 10 * expression. 11 * 12 * @param str a String containing a regular expression 13 * @return a <code>Regex</code> for <code>str</code> 14 * @throws RegexSyntaxException if <code>str</code> is not a valid regular expression 15 */ 16 Regex compile(String str) throws RegexSyntaxException; 17 } 18