LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.misc
Class LyRegExpUtils

java.lang.Object
  extended by 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
           
 
Constructor Summary
LyRegExpUtils()
           
 
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
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyRegExpUtils

public LyRegExpUtils()
Method Detail

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

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com