protected static String applyRegexp(final String text,final String[] patterns){
  String matchedString="";
  final int patternCount=patterns.length;
  for (int i=0; i < patternCount; i++) {
    final Pattern pa=Pattern.compile(patterns[i]);
    final Matcher m=pa.matcher(text);
    if (m.matches()) {
      i=patternCount;
      final int start=m.start();
      final int end=m.end();
      matchedString=text.substring(start,end);
    }
  }
  return matchedString;
}

protected static String applyRegexp ( final String text , final String [ ] patterns ) { String matchedString = "" ; final int patternCount = patterns . length ; for ( int i = 0 ; i < patternCount ; i ++ ) { final Pattern pa = Pattern . compile ( patterns [ i ] ) ; final Matcher m = pa . matcher ( text ) ; if ( m . matches ( ) ) { i = patternCount ; final int start = m . start ( ) ; final int end = m . end ( ) ; matchedString = text . substring ( start , end ) ; } } return matchedString ; }
apply one of more matching patterns and return where a match
