I'm trying to use the command line "rename" to change some filenames that contain several periods. For example: this.is.a.file.name.txt
After looking around a bit I've found some examples that almost get me there, but I can't seem to get it to work as required. Needless to say, I'm a very green beginner with regex's.
I've tried this:
rename -v -n 's/\.(.+?)(?=\.)//' this.is.a.file.name.txt
Which results in this:
this.a.file.name.txt
I've tried to modify the examples found in the following resources, but I'm stuck. PHP Regex: Select all except last occurrence Regex not replacing the last occurrence of a match