Changeset 43 for trunk/org.etsi.common/src/org/etsi/common/MiscTools.java
- Timestamp:
- 12/07/11 00:34:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.etsi.common/src/org/etsi/common/MiscTools.java
r29 r43 11 11 import java.io.Writer; 12 12 import java.text.DecimalFormat; 13 import java.util.regex.Matcher; 14 import java.util.regex.Pattern; 13 15 14 16 import org.etsi.common.exceptions.TerminationException; … … 170 172 } 171 173 172 174 //TODO: cloned from NamingConventionsChecker => needs to be unified and reused 175 public static boolean regExpMatch(String regExp, String subject) { 176 boolean matches = false; 177 Pattern pattern = Pattern.compile(regExp); 178 Matcher matcher = pattern.matcher(subject); 179 // System.out.println(regExp + " : " + subject); 180 if (matcher.matches()) { 181 matches = true; 182 } 183 return matches; 184 } 173 185 }
Note: See TracChangeset
for help on using the changeset viewer.