public static boolean matches ( String value , String prefix , String middle , String postfix ) { String pattern = prefix + middle + postfix ; boolean result = value . matches ( pattern ) ; return result ; }
Check whether value matches the pattern build with prefix middle part and post - fixer .