Page 1 of 1

Replacing Groups Of Numbers With Date

Posted: Mon Mar 07, 2011 5:40 pm
by lisamark0822
Hi,

I have a file that has the date in mmddyyyy format. I need to change it to mm/dd/yyyy. Is there an way to do this in textpad?

01012011 needs to be changed to 01/01/2011.

Thanks,

Mark

Posted: Mon Mar 07, 2011 6:40 pm
by ben_josephs
Use "Posix" regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax
Search | Replace... (<F8>):
Find what: \<([0-9]{2})([0-9]{2})([0-9]{4})\>
Replace with: \1/\2/\3

[X] Regular expression

Replace All