Class RegexEngineImpl
- java.lang.Object
-
- com.thaiopensource.datatype.xsd.regex.java.RegexEngineImpl
-
- All Implemented Interfaces:
RegexEngine
public class RegexEngineImpl extends Object implements RegexEngine
An implementation ofRegexEngine
using the JDK 1.4+java.util.regex
package.
-
-
Constructor Summary
Constructors Constructor Description RegexEngineImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Regex
compile(String str)
Compiles a string containing a regular expression into aRegex
object.
-
-
-
Method Detail
-
compile
public Regex compile(String str) throws RegexSyntaxException
Description copied from interface:RegexEngine
Compiles a string containing a regular expression into aRegex
object. TheRegex
object can be used to test whether a string matches the regular expression.- Specified by:
compile
in interfaceRegexEngine
- Parameters:
str
- a String containing a regular expression- Returns:
- a
Regex
forstr
- Throws:
RegexSyntaxException
- ifstr
is not a valid regular expression
-
-