public static String parseDate ( final String entry ) { Pattern pattern = Pattern . compile ( DATE_REGEX_4_DIGIT_YEAR ) ; String [ ] terms = entry . split ( " " ) ; Matcher matcher ; for ( String term : terms ) { matcher = pattern . matcher ( term ) ; if ( matcher . matches ( ) ) { return matcher . group ( ) ; } } pattern = Pattern . compile ( DATE_REGEX_2_DIGIT_YEAR ) ; terms = entry . split ( " " ) ; for ( String term : terms ) { matcher = pattern . matcher ( term ) ; if ( matcher . matches ( ) ) { return matcher . group ( ) ; } } return "" ; }
Parses the date .