dev-ngps7
asked on
Retrieving a file pattern format from an array
Hi Experts, I have an array of strings which stores xml files.
I would like to be able to retrieve files with a certain format.
//Current array data
KB_Java.xml
KB_Template.xml
kb00001.xml
kb00002.xml
I would like to retrieve the following.
kb00001.xml
kb00002.xml
My current method is looping through each file entry within the array, assign it to a string and then i wish to say something like,
If(stringFile(i) == certain pattern) then //matching kb00001/kb00002/kb00003 etc ..
add unique entry to another uniqueEntries array
Very hard and as of yet my research has found nothing on this :o(
Any ideas?
I would like to be able to retrieve files with a certain format.
//Current array data
KB_Java.xml
KB_Template.xml
kb00001.xml
kb00002.xml
I would like to retrieve the following.
kb00001.xml
kb00002.xml
My current method is looping through each file entry within the array, assign it to a string and then i wish to say something like,
If(stringFile(i) == certain pattern) then //matching kb00001/kb00002/kb00003 etc ..
add unique entry to another uniqueEntries array
Very hard and as of yet my research has found nothing on this :o(
Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Explanation: kb followed by exactly 5 digits followed by .xml
ASKER
Just what i was after, cheers zzync :o)
Thanks :°)