Thanks, I'll check them out.
On Wed, Nov 14, 2018 at 11:17 PM Andy Bach wrote:
> > Yes the purpose is to compare the timestamps ans yes these are the only
> two formats .
>
> Then you probably want to look at modules, like Date::Manip, google has
> lots of suggestions:
>
> https://stackoverflow.
> Yes the purpose is to compare the timestamps ans yes these are the only
two formats .
Then you probably want to look at modules, like Date::Manip, google has
lots of suggestions:
https://stackoverflow.com/questions/4199504/what-is-the-best-way-to-compare-dates-in-perl
https://www.perlmonks.org/?
Hi Andy ,
thanks for the reply . Yes the purpose is to compare the
timestamps ans yes these are the only two formats .
Thanks,
On Wed, Nov 14, 2018 at 2:48 AM Andy Bach wrote:
> Calling upgrade.sql on 05-JUL-18 10.19.42.559000 PM -12
> Calling apply.sql on 17.10.18 12:28:12,447849
Calling upgrade.sql on 05-JUL-18 10.19.42.559000 PM -12
Calling apply.sql on 17.10.18 12:28:12,447849 +02:
> I created on regex : \d\d\.\d\d\.\d\d\s[012][0-9]:[0-5][0-9]>:[0-5][0-9]
> this only matches : Calling apply.sql on 17.10.18 12:28:12,447849 +02:
Right as your first string has word chars
On Mon, 12 Nov 2018 18:18:12 +0530
Asad wrote:
> Hi all ,
>
>I have two stings from logfile how can we have a common regex so
> that its parse datetime details for further parsing ;
>
> Calling upgrade.sql on 05-JUL-18 10.19.42.559000 PM -12
> Calling apply.sql on 17.10.18 12:28:12,
You could change the first portion of RegEx to
\d{2}[.\-](\d{2}|\D{3})[.\-]
This could cover all the valid Month codes, but this will look for the hyphen
or period and two digit month or three non digits and then the the hyphen or
period following. There is much more you could do, but this cove