Re: [ID] Replace Euro format date text with U.S. format

87 views
Skip to first unread message

William Adams

unread,
May 20, 2013, 1:14:17 PM5/20/13
to indesi...@googlegroups.com
On May 20, 2013, at 1:06 PM, Hank wrote:

> I have 1000+ paras in 7 files that begin with a date such as 27 November 1937. I need to change the format for such a date to November 27, 1937. Can anyone help with this?

Pretty straight-forward using GREP.

- open all 7 files
- bring up the find-replace palette
- set it to search all open documents

Find: ^(\d+) (\u\l+) (\d+)
Replace: $2 $1, $3

Tested on your sample text and delimited to the beginning of paragraphs (^) and numbers (\d+) and a cap followed by one or more lowercase letters (\u\l+).

William

--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.

Andrew Brown

unread,
May 20, 2013, 1:20:14 PM5/20/13
to indesi...@googlegroups.com
On 20 mai 2013, at 19:06, Hank <henry....@gmail.com> wrote:

> I have 1000+ paras in 7 files that begin with a date such as 27 November 1937. I need to change the format for such a date to November 27, 1937. Can anyone help with this?

That's a very retrograde step, you don't want to take it... the only logical orders for dates are day month year and (better still) year month day. Next I hear you'll be wanting to measure something in pounds and ounces, or ounces and pounds perhaps.

AB

William Adams

unread,
May 20, 2013, 1:36:41 PM5/20/13
to indesi...@googlegroups.com
On May 20, 2013, at 1:28 PM, Hank wrote:

> Thanks so much for the quick response. However (ID6) after pasting in the expression I got a "Cannot find match" message. Any suggestions?

Did you paste it into the GREP tab?
Reply all
Reply to author
Forward
0 new messages