Re: Regex for date format

2018-06-29 Thread Mike Martin
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

Re: Regex for date format

2018-06-29 Thread Mike Martin
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

Re: Regex for date format

2018-06-29 Thread Uri Guttman
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

Re: Regex for date format

2018-06-29 Thread Uri Guttman
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

Regex for date format

2018-06-29 Thread Mike Martin
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 getting a bit stuck, lookbehind doesnt seem to work as it includes the lookbehind on every occurence last attempt is s/(?<= )-/: