Hi, I'm trying to change the name of a file which starts off life as:
wire_01_mar_2007
and I wish to transform this to:
070301_Res_FM_The_Wire_Presents.
ie. essentially transforming a dd_mmm_yyyy format to yymmdd
I've had partial success with my match string:
^(....)_(..)_(...)_20(..).*
and replace
\4\3\2_ResFM_The_Wire_Presents
but I still end up with the mmm month format in the output:
07mar01_Res_FM_The_Wire_Presents
I can even match a range of mmm month names in my match string thus:
^(....)_(..)_(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)_20(..).*
but alas, I'm struggling to find a way of converting the mmm format to a two digit mm format in my output.
Is there any way of performing any conditional replacement in BRU?
ie jan>>01, feb>>02 etc. I can't seem to find a way of doing this in the 'repl. (3)' section of BRU.
Note that I can't use the autodate function(s) since the creation date may bear no resemblance to the date embedded in the file name!