private void compilePattern(String patternString){
  try {
    pattern=Pattern.compile(patternString);
  }
 catch (  PatternSyntaxException ex) {
    LOGGER.warning("Invalid regex: " + ex.getLocalizedMessage());
  }
}

private void compilePattern ( String patternString ) { try { pattern = Pattern . compile ( patternString ) ; } catch ( PatternSyntaxException ex ) { LOGGER . warning ( "Invalid regex: " + ex . getLocalizedMessage ( ) ) ; } }
compiles a pattern ( regex ) and sets it as pattern .
