I am trying to select all .txt files in known directory. For example I know the path : C:/../Desktop/ and now I want to take all .txt files which are on Desktop.
So which regularExpression should I use and how can i search it ? I dont know very much knowlegde about java. If you help me i will very happy.
String regularExpression = ?
String path = "C:/../Desktop/";
Pattern pattern = Pattern.compile(regularExpression);
boolean isMatched = Pattern.matches(regularExpression,path);