I am trying to do this in Java
:
I receive this kind of string
\"12/07/2004ffffdsss12/10/2010ñrrñrñr10/01/2000ksdifjsdifffffdd04/04/1998\"
You can separate the validity of the date with the extracted content.
To extract the dates:
String regex = "\\d{2}/\\d{2}/\\d{4}";
Check here at fiddle: http://fiddle.re/fa0bf
Code:
String input = "12/07/2004ffffdsss12/10/2010ñrrñrñr10/01/2000ksdifjsdifffffdd04/04/1998";
String regex = "\\d{2}/\\d{2}/\\d{4}";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(input);
while (matcher.find()) {
System.out.println(matcher.group());
}
Gives,
12/07/2004
12/10/2010
10/01/2000
04/04/1998