-1

I am having a file name like suppose abcde-1_Transformed.xml.

Now if I have many number of files suppose in the above file name the '1' which is present has files like
abcde-2_Transformed.xml.
abcde-3_Transformed.xml.
abcde-4_Transformed.xml.
till abcde-1966_Transformed.xml.

How to get the file names which are not present in the total number of files using regex ?

Andreas
  • 154,647
  • 11
  • 152
  • 247
Rhino 0419
  • 29
  • 2
  • your question is not clear. do you mean you need a file that does not fall between abcde-1_Transformed.xml and abcde-1966_Transformed.xml? – Priyath Gregory Mar 22 '16 at 06:01
  • 2
    It looks like you want us to write some code for you. While many users are willing to produce code for a coder in distress, they usually only help when the poster has already tried to solve the problem on their own. A good way to demonstrate this effort is to include the code you've written so far, example input (if there is any), the expected output, and the output you actually get (console output, stack traces, compiler errors - whatever is applicable). The more detail you provide, the more answers you are likely to receive. – TheLostMind Mar 22 '16 at 06:01
  • "How to get the file names which are not present"? Isn't your output going to be infinite? – ajb Mar 22 '16 at 06:09

1 Answers1

1

I think rather than making a regex you can just read the file in the current directory using this link Read all files in a folder

Then parse out the number from file name and check if it's present or not.

Community
  • 1
  • 1
Denis
  • 1,219
  • 1
  • 10
  • 15