At 17:24 08/12/2007 +0100, Rafal Noname wrote:
I have time informations in format like "5h 3m 10s" or "4m 10s" (if
zero hours)
how to use it as a time, in example convert it into normal 4:10
format using some regexp?
Here's a suggestion:
o First put the hours figures in explicitly where they are
missing. To do this, replace
^[:digit:]*m
with
0 & (That's zero-space-ampersand.)
This searches for any number of digits at the start of the cell,
followed immediately by "m". It prefaces matched strings with
zero-space. (There is no need to add the "h".)
o Now remove all the unit symbols. Replace
[hms]
with nothing.
o Insert the required colons. Replace space with ":".
The cells should format themselves automatically as times. You may
need to modify this technique slightly if you have leading spaces or
the possibility of multiple spaces separating the items, of course.
I trust this helps.
Brian Barker
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]