Thank you for the suggestion. I finally got this working playing with
changing the formats here: https://www.functions-online.com/strftime.html.
Working line of code: Exec if $raw_event =~
/(^\d\d.\d\d.\d\d\d\d\s\d\d:\d\d:\d\d)/ $EventTime = strptime($1, '%m/%d/%Y
%T');
Thank you to the community
I would suggest that you leave out strptime for the meantime, and just
assign $EventTime to $1, at least temporarily. That way, you could be
confident in that you were actually capturing the correct data.
Do you have 0 or space-padded values? Are the values padded at all (note
that %m is "(1-12)"
Thanks for helping but i'm still a bust.
Exec if $raw_event =~ /^(\d\d.\d\d.\d\d\d\d\s\d\d:\d\d:\d\d)/ $EventTime =
strptime($1, '%m/%d/%y %H:%M:%S');
Returns Null.
Exec if $raw_event =~ /(^\d\d.\d\d.\d\d\d\d\s\d\d:\d\d:\d\d)/ $EventTime =
strptime($1, '%m/%d/%y %H:%M:%S');
Returns null,
Getti
Hi,
I don't think parsedate() would work with this format, though strptime()
should.
You are missing the capturing for $1 to hold any value, i.e. the
regexp should be: /(^\d\d.\d\d.\d\d\d\d\s\d\d:\d\d:\d\d)/
Regards,
Botond
On Mon, 28 Jul 2014 18:07:28 -0400
Chris wrote:
> Thanks. Seems I'm g
Thanks. Seems I'm getting farther, but still having a cruddy time with this
date.
I have a date format like so:
06/15/2014 13:18:14,146
Seems like I should be able to do this:
Exec if $raw_event =~ /^\d\d.\d\d.\d\d\d\d\s\d\d:\d\d:\d\d/
$EventReceivedTime = strptime($1, '%m/%d/%y %H:%M:%S');
I
Hi,
Unfortunately there is still an open issue with the grammar wrt
backslashes inside regular expressions, I think this case is also related.
The workaround is to avoid using '\/', e.g. it may be possible to use the
'.' instead.
Regards,
Botond
On Mon, 28 Jul 2014 15:19:00 -0400
Chris wrote:
Sorry, I still cant get this working. The regex works fine in the
xm_multiline , but does not compile in im_file. Thought I could replace the
"/" delimiter to prevent escaping , but that didn't work either. Any ideas
or work around?
Thank you
Chris
_
Module
Ah thanks. I was using a Python regex tester (an it was passing). I'll
switch to Pearl.(http://www.internetofficer.com/seo-tool/regex-tester/)
Thank you,
Chris
--
Infragistics Professional
Build stunning WinForms apps tod
You are not escaping embedded / characters in the pattern
(/\d\d/\d\d/... should be /\d\d\/\d\d\/...).
Regards,
Mark
On 7/27/2014 3:03 PM, Chris wrote:
Hi,
Trying to do this:
Exec if ($raw_event =~ /^\d\d/\d\d/\d\d\d\d\s\d\d:\d\d:\d\d\,\d\d\d/)
$EventTime = strptime($1, '%Y-%m-%dT%l:%M:%S%z