How to Filter Directory Contents?

2017-05-19 16:17:45

How can I filter directory contents to return the highest numeric named directory? For example, suppose (directory-files "/some/dir") returns:

("." ".." "4.03.0" "4.02.9" "archives" "config" "log")

How can I extract the string "4.03.0"?

I tried using seq-remove with a regexp based predicate, but could not get it to work. Suggestions and insights appreciated. Thanks.