TimeStamp regular Experessions

General discussions about Advanced Find and Replace
Post Reply
awilde
Posts: 1
Joined: Mon May 07, 2007 11:42 pm

TimeStamp regular Experessions

Post by awilde » Mon May 07, 2007 11:47 pm

I am trying to replace a period with a colon within a time stamp but without effecting other periods in in the text.

<trkpt lat="31.579166667" lon="120.295263333">
<ele>24.533331553</ele>
<time>2007-05-05T11:20:57.927Z</time>
</trkpt>

In the <time> row I need to change the last . to : this has always the Z character 3 places after

It should look like

<trkpt lat="31.579166667" lon="120.295263333">
<ele>24.533331553</ele>
<time>2007-05-05T11:20:57:927Z</time>
</trkpt>

Abacre
Site Admin
Posts: 1198
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Post by Abacre » Thu May 10, 2007 5:18 pm

Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
<time>(.*)\.(\d{3})Z</time>
Replace with:
<time>$1:$2Z</time>

That's all I verified it works perfectly.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests