This is a heavily interactive web application, and JavaScript is required. Simple HTML interfaces are possible, but that is not what this is.
Post
Tsunehisa Kazawa
digitune.org
did:plc:cwotqp3elvxarzqmfml7jol5
なるほど、Goでstring型に対してslice操作を行うとbyte単位で行われるので元のコードでもそこまでおかしな結果にならなかったのか。まぁせっかくregexp.FindAllIndex用にbyte sliceを作っているのでそっちを使うのが意味が明瞭という意味で正解ではあるが。
"インデックスはバイト単位で計算される" Go のスライスを利用した文字列操作について解説 https://af-e.net/go-slicing-strings/#:~:text=%E3%82%A4%E3%83%B3%E3%83%87%E3%83%83%E3%82%AF%E3%82%B9%E3%81%AF%E3%83%90%E3%82%A4%E3%83%88%E5%8D%98%E4%BD%8D%E3%81%A7%E8%A8%88%E7%AE%97%E3%81%95%E3%82%8C%E3%82%8B
2026-05-20T22:53:08.073Z