How do I do a replace using TextPad for all date occurrences such as
01-Apr-2014 02-Apr-2014 03-Apr-2014
to
2014-Apr-01 2014-Apr-02 2014-Apr-03
I tried a bunch of regular expressions for the date, but can't even get it working once. Thanks.
You can use this regex:
(\d+)-(\w+)-(\d+)
And then change the order of capturing group index:
The expressions below work in Textpad. Federico was using POSIX syntax which you have to specifically tell Textpad to use in Configure>Properties>Editor. Also, you got a "literal expression" not found, meaning you didn't check the regular expression checkbox in the search window.
Find What: ([0-9]+)-([a-z]+)-([0-9]+)
Replace With: \3-\2-\1