leon.misc
Class LyRegExpUtils
java.lang.Object
leon.misc.LyRegExpUtils
public class LyRegExpUtils
- extends java.lang.Object
This class implements some basic methods used for checking regular expressions.
Field Summary |
static java.lang.String |
__VERSION
|
Method Summary |
static java.util.regex.Pattern |
getPattern(java.lang.String format)
Gets the pattern of the given format. |
static boolean |
matchFormat(LyEnvironment environment,
java.lang.String format,
java.lang.String value)
Tests if a string match a regular expression. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
__VERSION
public static final java.lang.String __VERSION
- See Also:
- Constant Field Values
LyRegExpUtils
public LyRegExpUtils()
matchFormat
public static boolean matchFormat(LyEnvironment environment,
java.lang.String format,
java.lang.String value)
- Tests if a string match a regular expression.
- Parameters:
environment
- Environment where the test occured.format
- The regular expression.value
- The string that must be match the regula expression.
- Returns:
- true if the given string match the regular expression, false otherwise.
getPattern
public static java.util.regex.Pattern getPattern(java.lang.String format)
throws java.util.regex.PatternSyntaxException
- Gets the pattern of the given format.
- Parameters:
format
- the format to analyse
- Returns:
- the found pattern into the given format
- Throws:
java.util.regex.PatternSyntaxException
- if the patter of the format is not well formed
Website: W4 S.A., contact us: support@w4global.com