Below is an example of how this could be solved with links to regex101.com to try them out
This will replace the periods
Match = '/[\s\.]/m'; Replace = ' '
This will put brackets around our year
Match = /(.)(\d\d\d\d)/gm; Replace = `\1(\2)`;
I am currently not on a *nix machine and so am not able to try this out.
But to do this in CLI,
rnm like this
rnm -y -rs '[Regex]' [FileLocation]
-y will confirm all changes without asking
-rs replace string command
‘[Regex]’ is your regex statement
‘[FileLocation] is where all your directories are. use ./* for all
rnm -y -rs ''s/(.+ )(\d\d\d\d)/\1(\2)/'' ./*
use link below as reference;
CLICK HERE to find out more related problems solutions.