Re: Regular Expressions
Posted: Sat Jun 11, 2016 11:53 am
Maybe it will help someone who comes across this topic… I decided to go in mode "full geek" and just installed "rename" with brew: http://brewformulas.org/rename
Then just use the "Run shell script" and in the embed script, I just went with something like that:
This will rename the file with group 2 and 4 (the extension in my case, which you'll most likely want to keep most of the time )
Then just use the "Run shell script" and in the embed script, I just went with something like that:
- Code: Select all
rename 's/^(your-regex)(regex-group-2)(regex-group-3)(\..{3})$/$2$4/' *
This will rename the file with group 2 and 4 (the extension in my case, which you'll most likely want to keep most of the time )