Page 1 of 1

TimeStamp regular Experessions

Posted: Mon May 07, 2007 11:47 pm
by awilde
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>

Posted: Thu May 10, 2007 5:18 pm
by Abacre
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.