Replacing Groups Of Numbers With Date

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
lisamark0822
Posts: 11
Joined: Wed Feb 09, 2005 9:07 pm

Replacing Groups Of Numbers With Date

Post 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
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post 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
Post Reply