/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

import java.time.* ;
import java.time.format.* ;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
String input = "coming from the 11/25/2009 to the 11/30/2009" ;
String[] elements = input.split( " " ) ; 
DateTimeFormatter f = DateTimeFormatter.ofPattern( "MM/dd/uuuu" ) ;
List<LocalDate> dates = new ArrayList<>() ;
for( String element : elements ) {
	try {
		LocalDate ld = LocalDate.parse( element , f ) ;
		dates.add( ld ) ;
	} catch ( DateTimeParseException e ) {
		// Ignore the exception. Move on to next element.
	}
}
System.out.println( "dates: " + dates ) ;

	}
}