"Asad" wrote in message
news:cag3lskh4dphjg18c-jxmo8bcqfd+vix5tep1ytsp4_6pd6z...@mail.gmail.com...
Hi All ,
I need a regex to match the date : Sat Aug 25 08:41:03 2018 and
covert into a format :'%m/%d/%Y %H:%M:%S'
Thanks,
--
Asad Hasan
+91 9582111698
Hello Asad,
You co
Many Perl modules have been written to parse and manipulate dates and times.
Some come with Perl; others are available at www.cpan.org.
Check out the Date::Manip, Date::Parse, or DateTime modules.
> On Aug 25, 2018, at 4:06 AM, Asad wrote:
>
> Hi All ,
>
> I need a regex to match the
Thanks, I'll check them out.
On Sat, Aug 25, 2018 at 4:53 PM Home Linux Info
wrote:
>
> Hello,
>
> Maybe not the most beautiful regex out there, hey I'm a noob, but it does
> the job right:
> ([A-Z][a-z]{2}\s)|([0-9]{2}\s[0-2][0-9](:[0-5][0-9]){2}\s[0-9]{4})
> You can start from here and find a
Hello,
Maybe not the most beautiful regex out there, hey I'm a noob, but it
does the job right:
([A-Z][a-z]{2}\s)|([0-9]{2}\s[0-2][0-9](:[0-5][0-9]){2}\s[0-9]{4})
You can start from here and find a nicer form of this regex.
On 8/25/18 2:06 PM, Asad wrote:
Hi All ,
I need a regex
Really, no attempt to do it yourself?
Mike
On 8/25/2018 6:06 AM, beginners-digest-h...@perl.org wrote:
Hi All ,
I need a regex to match the date : Sat Aug 25 08:41:03 2018
and covert into a format : '%m/%d/%Y %H:%M:%S'
Thanks,
--
Asad Hasan
Worked perfectly thanks, uri, and same technique works perfectly in
postgresql regexp_replace for info
On 29 June 2018 at 16:18, Mike Martin wrote:
> Thanks
>
>
> On Fri, 29 Jun 2018, 15:48 Uri Guttman, wrote:
>
>> On 06/29/2018 10:41 AM, Mike Martin wrote:
>>
>> sorry
>> -mm-dd hh:mm:ss.dd
Thanks
On Fri, 29 Jun 2018, 15:48 Uri Guttman, wrote:
> On 06/29/2018 10:41 AM, Mike Martin wrote:
>
> sorry
> -mm-dd hh:mm:ss.dd
> eg:
> 2018-01-01 12-45-10-456789 to
> 2018-01-01 12:45:10.456789
>
>
>
> please reply to the list and not to me!
>
> then why did you want lookbehind? this
On 06/29/2018 10:41 AM, Mike Martin wrote:
sorry
-mm-dd hh:mm:ss.dd
eg:
2018-01-01 12-45-10-456789 to
2018-01-01 12:45:10.456789
please reply to the list and not to me!
then why did you want lookbehind? this is very easy if you just grab the
time parts and reassemble them as you wan
On 06/29/2018 09:32 AM, Mike Martin wrote:
Hi
I am trying to convert a string of the format
2018-01-01 16-45-21-654278
to a proper timestamp string
so basically I want to replace all - after the date part
i am not sure what you are trying to do. show the after text that you
want. a proper t
Mark Martin schreef:
> would anybody have to hand a regex for date "dd-mmm-yy". I want to be
> able to validate dates that should be along the lines of :
>
> 06-jan-06
See Regexp::Common::time (yes, lowercase 't')
http://search.cpan.org/search?module=Regexp::Common::time
--
Affijn, Ruud
"Gewoo
On Tuesday 06 June 2006 12:52, Mark Martin wrote:
> Hi,
> would anybody have to hand a regex for date "dd-mmm-yy". I want to be able
> to validate dates that should be along the lines of :
>
> 06-jan-06
m/(0?[1-9]|[12]\d|3[01])-(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|
dec)-(\d\d)/i
Untested.
11 matches
Mail list logo