I’m creating a long regex to restructure some bank statements into a CSV format and making some other adjustments as well. I’d prefer not to use multiple Regexes as I have a lot of files to process. So far it is working well however I’m at a point where I’d like to replace a capture group with some other text but I’m not sure if that is even possible.
To be more specific, I would like to search for the months as ( Jan)( Feb)( Mar)* etc. with the expectation that these would be capture groups $1, $2, $3 etc. and replace them with “/01/2024”, “/02/2024”, “/03/2024” etc. Where “Jan” would be replaced with “/01/2024” instead of using $1.
For example:
Data:
29 Jul Some long text that will be restructured $440.00 $2,033.80 CR
30 Aug Some other text that will be restructured $21.00 $2,054.80 CR
30 Oct Some more sample text that will be restructured $26.65 $2,081.45 CR
Expected output:
29/07/2024 Some long text that will be restructured $440.00 $2,033.80 CR
30/08/2024 Some other text that will be restructured $21.00 $2,054.80 CR
30/10/2024 Some more sample text that will be restructured $26.65 $2,081.45 CR
Is there a way to do this using Regex in Sublime Text’s Find and Replace?