Re: [go-nuts] Regexp: Matching a new line but *not* start of string, from a Reader

2018-04-09 Thread Paul Lalonde
The FindReaderSubmatchIndex may need to read arbitrarily far after the end of the match, so if you want multiple matches you'll need a ReadSeeker and re-wind to the end of the previous match. Paul On Monday, April 9, 2018 at 10:37:31 AM UTC-4, Alex Efros wrote: > > Hi! > > On Mon, Apr 09, 2018

Re: [go-nuts] Regexp: Matching a new line but *not* start of string, from a Reader

2018-04-09 Thread Paul Lalonde
ks for the lead, Rog. Paul On Monday, April 9, 2018 at 4:40:27 AM UTC-4, rog wrote: > > On 9 April 2018 at 09:31, Jan Mercl <0xj...@gmail.com > > wrote: > > On Mon, Apr 9, 2018 at 6:47 AM Paul Lalonde > > > wrote: > > > >> Any advice? > >

[go-nuts] Regexp: Matching a new line but *not* start of string, from a Reader

2018-04-08 Thread Paul Lalonde
A ^ normally matches either the start of string or the start of a new line (with the m flag). I'd like to match only starts of lines, but not starts of strings, ideally without changing the regexp. My source data is in a ReadSeeker, and if I use Regexp.FindReaderSubmatchIndex() I can get the fi