I made a lot of research before I put this question. I found a different links to do batch rename using regex like this and other similars:
My problem is this, I want to do batch rename using Regex but my code doesn't work.
I have inside a folder different files named like this:
name_house_1_door.jpg name_house_2_door.jpg name_house_3_door.jpg name_house_4_door.jpg
And I want to rename the files like this:
name_house_1.jpg name_house_2.jpg name_house_3.jpg name_house_4.jpg
The code that approximate most of that I want was:
$ rename -v 's/house\_[0-9]\_door/house_[0-9]/'
But as you should know the first file was renamed as: name_house_[0-9].jpg