protected Pattern compilePattern ( Element regex , int flags ) { Pattern p = null ; try { String re = ( ( StringProperty ) regex ) . getValue ( ) ; p = Pattern . compile ( re , flags ) ; } catch ( PatternSyntaxException pse ) { throw EvaluationException . create ( sourceRange , MSG_INVALID_REGEXP , pse . getLocalizedMessage ( ) ) ; } return p ; }
Generate a Pattern from the given string and flags .