I am trying to get the names of the image files on my local machine and also that It should not be repeated. I have got all the file names in an array and when I try to go in the array and use Split() I get some 888 as output. I am looking for a regex where I can print everything before the '_'(underscore) encountered. I need to get the names and then I can use Uniq to remove the duplicates. Any suggestions are welcomed.I am trying to get the names of the image files