Re: [go-nuts] Searching recursively in GOLANG

2021-03-17 Thread jake...@gmail.com
You could also achieve this using the regexp package. But, in this case, it would probably be overkill. On Tuesday, March 16, 2021 at 2:55:29 AM UTC-4 Sharan Guhan wrote: > Thanks for the tip! I just wanted to make sure, I am not missing some > basic API out there.. Will code this up :-) > >

Re: [go-nuts] Searching recursively in GOLANG

2021-03-15 Thread Sharan Guhan
Thanks for the tip! I just wanted to make sure, I am not missing some basic API out there.. Will code this up :-) Sharan On Mon, Mar 15, 2021 at 11:18 PM Jan Mercl <0xj...@gmail.com> wrote: > On Tue, Mar 16, 2021 at 7:06 AM Sharan Guhan wrote: > > > Seems a trivial problem, but unable to find

Re: [go-nuts] Searching recursively in GOLANG

2021-03-15 Thread Jan Mercl
On Tue, Mar 16, 2021 at 7:06 AM Sharan Guhan wrote: > Seems a trivial problem, but unable to find the right imports to do this.. > Want to search for a substring in a huge string ( output of a exec.command) > and get the index for every occurrence of that substring. I used Index and > LastInd

[go-nuts] Searching recursively in GOLANG

2021-03-15 Thread Sharan Guhan
Hi Experts, Seems a trivial problem, but unable to find the right imports to do this.. Want to search for a substring in a huge string ( output of a exec.command) and get the index for every occurrence of that substring. I used Index and LastIndex, both give first and last, but am looking for Ind