dkim18
asked on
RE or stringTokenizer for searching??
Hi
I have file names in this format, "MMDDYY" in a folder.
I am trying to find all the file names when MM/YY is given.
so 09/05...I want to find all the file names in 09 in 2005.
Should I just break the file name into char[0-1], char[2-3], char[4-5]??
Or is there better way to search with RE??
Thanks for your help in advance.
I have file names in this format, "MMDDYY" in a folder.
I am trying to find all the file names when MM/YY is given.
so 09/05...I want to find all the file names in 09 in 2005.
Should I just break the file name into char[0-1], char[2-3], char[4-5]??
Or is there better way to search with RE??
Thanks for your help in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I just used substring().
Thanks.
Thanks.
String month = ...
String year = ...
String regex = month + "[0-9]+" + year;