private boolean buildRegexpParser ( ) { // Convert wildcard string mask to regular expression String regexp = convertWildcardExpressionToRegularExpression ( mStringMask ) ; if ( regexp == null ) { out . println ( DebugUtil . getPrefixErrorMessage ( this ) + "irregularity in regexp conversion - now not able to parse any strings, all strings will be rejected!" ) ; return false ; } // Instantiate a regular expression parser try { mRegexpParser = Pattern . compile ( regexp ) ; } catch ( PatternSyntaxException e ) { if ( mDebugging ) { out . println ( DebugUtil . getPrefixErrorMessage ( this ) + "RESyntaxException \"" + e . getMessage ( ) + "\" caught - now not able to parse any strings, all strings will be rejected!" ) ; } if ( mDebugging ) { e . printStackTrace ( System . err ) ; } return false ; } if ( mDebugging ) { out . println ( DebugUtil . getPrefixDebugMessage ( this ) + "regular expression parser from regular expression " + regexp + " extracted from wildcard string mask " + mStringMask + "." ) ; } return true ; }
Builds the regexp parser .