Here you can find the source of parseDate(String text)
public static String parseDate(String text)
//package com.java2s; //License from project: Apache License import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static String parseDate(String text) { String regex = "(\\d{4}[-|\\/]\\d{1,2}[-|\\/]\\d{1,2})"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(text); while (m.find()) { return m.group(); }//from w ww .j a v a2 s.co m return ""; } }