01: /*
02: * FileNamePatternUtil.java
03: *
04: * Created on May 17, 2007, 3:07:24 PM
05: *
06: * To change this template, choose Tools | Template Manager
07: * and open the template in the editor.
08: */
09:
10: package org.netbeans.modules.wsdlextensions.file.validator;
11:
12: import java.util.regex.Pattern;
13: import java.util.regex.Matcher;
14:
15: /**
16: *
17: * @author jfu
18: */
19: public class Utils {
20: private static final String ENV_VAR_REGEX = "\\$\\{([a-zA-Z0-9\\.\\-\\_^\\{\\}]+)\\}";
21: public static final Pattern ENV_VAR_REF_REGEX_PATT = Pattern
22: .compile(ENV_VAR_REGEX);
23:
24: public static boolean hasMigrationEnvVarRef(String attrVal)
25: throws Exception {
26: return ENV_VAR_REF_REGEX_PATT.matcher(attrVal).find();
27: }
28:
29: }
|