Re: [gentoo-user] OT: Extracting year from data, but honour empty lines

2018-05-12 Thread Daniel Frey
On 05/12/18 00:09, Paul Colquhoun wrote: > On Saturday, 12 May 2018 12:05:47 PM AEST Paul Colquhoun wrote: >> You can add an alternate regular expression that matches the blank lines, >> but the '-o' switch will still stop that match from being printed as it is >> an 'empty' match. The trick is to

Re: [gentoo-user] OT: Extracting year from data, but honour empty lines

2018-05-12 Thread Paul Colquhoun
On Saturday, 12 May 2018 12:05:47 PM AEST Paul Colquhoun wrote: > On Saturday, 12 May 2018 9:16:52 AM AEST Daniel Frey wrote: > > Hi all, > > > > I am trying to do something relatively simple and I've had something > > working in the past, but my brain just doesn't want to work today. > > > > I

Re: [gentoo-user] OT: Extracting year from data, but honour empty lines

2018-05-12 Thread Alexander Kapshuk
On Sat, May 12, 2018 at 2:16 AM, Daniel Frey wrote: > Hi all, > > I am trying to do something relatively simple and I've had something > working in the past, but my brain just doesn't want to work today. > > I have a text file with the following (this is just a subset of about

Re: [gentoo-user] OT: Extracting year from data, but honour empty lines

2018-05-11 Thread R0b0t1
On Fri, May 11, 2018 at 6:16 PM, Daniel Frey wrote: > Hi all, > > I am trying to do something relatively simple and I've had something > working in the past, but my brain just doesn't want to work today. > > I have a text file with the following (this is just a subset of about

Re: [gentoo-user] OT: Extracting year from data, but honour empty lines

2018-05-11 Thread Floyd Anderson
Hi Daniel, On Fri, 11 May 2018 16:16:52 -0700 Daniel Frey wrote: […] Does anyone have a quick tip for my tired brain to make this work and just output a blank line if there's no match? I swear I did this months ago and had something working but I apparently didn't bother

Re: [gentoo-user] OT: Extracting year from data, but honour empty lines

2018-05-11 Thread Paul Colquhoun
On Saturday, 12 May 2018 9:16:52 AM AEST Daniel Frey wrote: > Hi all, > > I am trying to do something relatively simple and I've had something > working in the past, but my brain just doesn't want to work today. > > I have a text file with the following (this is just a subset of about > 2500

Re: [gentoo-user] OT: Extracting year from data, but honour empty lines

2018-05-11 Thread Andrew Udvare
> On May 11, 2018, at 7:16 PM, Daniel Frey wrote: > > Hi all, > > I am trying to do something relatively simple and I've had something > working in the past, but my brain just doesn't want to work today. > > I have a text file with the following (this is just a subset of

[gentoo-user] OT: Extracting year from data, but honour empty lines

2018-05-11 Thread Daniel Frey
Hi all, I am trying to do something relatively simple and I've had something working in the past, but my brain just doesn't want to work today. I have a text file with the following (this is just a subset of about 2500 dates, and I don't want to edit these all by hand if I can avoid it): ---