}
private static final String REG_EXP_PATTERN = "cachedRegExpPattern";
protected <T extends ValidationListener> void validateRegExp(ValidationContext<T> context) {
final MetaProperty meta = context.getMetaProperty();
final String regExp = (String) meta.getFeature(REG_EXP);
if (regExp == null) return;
if (context.getPropertyValue() == null) return;
final String value = String.valueOf(context.getPropertyValue());
try {
Pattern pattern = (Pattern) meta.getFeature(REG_EXP_PATTERN);
if (pattern == null) {
pattern = Pattern.compile(regExp);
meta.putFeature(REG_EXP_PATTERN, pattern);
}
if (!pattern.matcher(value).matches()) {
context.getListener().addError(REG_EXP, context);
}
} catch (PatternSyntaxException e) {