Looking for a regex to test for filenames with multiple extensions
I am looking for regular expression to test for files with more than one extensions, i.e test.1.log.old
Thank开发者_如何学Pythons, M.
If you are only testing filenames, then this will work.
(.[^.]+\.){2}
You may need to modify the regex if you try to match against more than file names (path).
精彩评论