Question

Please help me out with a regex to find the last modified file/latest updated file in the folder.

The files are in this manner:

Test.2014_02_20 updated 13:00:23
Test.2014_02_21 updated 15:23:23
Test.2014_02_25 updated 21:24:23

Using regex we need to pick up the file Test.2014_02_25 updated 21:24:23

Thanks.

Was it helpful?

Solution

Through the comments from @Theox and @piet.t, OP has concluded that regular expressions were not the best tool to accomplish the task here.

"You can use regexs to validate the format of the line (...)" - Theox

"(...) the concept of ordering things by some criteria is way out of the scope of regex" - piet.t

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top