Ignore:
Timestamp:
12/07/11 00:34:32 (13 years ago)
Author:
phdmakk
Message:

+ added functionality for the specification of resources to be ignored during processing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/org.etsi.common/src/org/etsi/common/MiscTools.java

    r29 r43  
    1111import java.io.Writer; 
    1212import java.text.DecimalFormat; 
     13import java.util.regex.Matcher; 
     14import java.util.regex.Pattern; 
    1315 
    1416import org.etsi.common.exceptions.TerminationException; 
     
    170172        } 
    171173 
    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        } 
    173185} 
Note: See TracChangeset for help on using the changeset viewer.