Hello people thanks for the help so far. I Have a regex for finding a date in a given string and it does not seem to working. Could someone tell me what I am doing wrong? The code goes something like
Pattern pattern = Pattern.compile("^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\\d\\d(?:,)$");
Matcher match = pattern.matcher(text1);
List<String> removable1 = new ArrayList<String>();
while(match.find()) {
removable1.add(match.group());
}
I know that there is a date "7/2/2013" contained in the string text1 which is not being written to the list removable1. Any help is appreciated thanks in advance.