i'm working on this for hours but no success
i want strip the time from a string
samples:
xxx was here 1 hour and 3 seconds ago
xxx last seen 1 week 5 days 3 hrs 5 mins 1 sec
xxx was online 5mins 3sec ago
--
i only need the time .. -> 1 hour 3 seconds
or 1 week 5 days 3 hrs 5 mins 1 sec
You call those 3 things "samples", and each one has a different format. Are those all of the formats, or are there more? If those are it, it's really easy, just use regexp to get the text between "was here" and "ago", for instance.
stdragon wrote:You call those 3 things "samples", and each one has a different format. Are those all of the formats, or are there more? If those are it, it's really easy, just use regexp to get the text between "was here" and "ago", for instance.