I'm changing dates in a text qualified CSV file from DDMMMYYYY ("22Jan2014") to YYYYMMDD ("20140122").
This Regex Replace did not work.
I'm guessing TextPad is determining, "There aren't 401 sub-expressions. PICNIC."Find what: (")(\d{2})(Jan)(\d{4})(")
Replace with: $1$401$2$5
[X] Regular expression
Replace All
This Regex Replace worked.
This Regex Replace also worked, and I find it easier to read.Find what: (")(\d{2})(Jan)(\d{4})(")
Replace with: $1$4\x30\x31$2$5
[X] Regular expression
Replace All
If you're following along, and you need this for something, this only fixed the January dates. I had to rinse and repeat for the other 11 months.Find what: (")(\d{2})(Jan)(\d{4})(")
Replace with: ${1}${4}01${2}${5}
[X] Regular expression
Replace All