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 at 09:25:02AM +0100, roger peppe wrote: 
> > While we're on the subject, ISTM that FindReaderSubmatchIndex should 
> > really return []int64 not []int. A bit late now though. 
>
> BTW, is there any good example for FindReaderSubmatchIndex? 
> I've just tried it with strings.Reader and found current seek position 
> after FindReaderSubmatchIndex is in 3 bytes after end of the match: 
> https://play.golang.org/p/OJT7Ri8ji2C 
>
> -- 
>                         WBR, Alex. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to