Never use a cannon as a fly swatter. A regular expression is heavy artillery. A for-loop will do just fine: smaller, simpler, faster, land ess dependencies:
https://play.golang.org/p/2nr4VdkqaNF On Sat, Dec 29, 2018 at 8:17 PM Matt Harden <matt.har...@gmail.com> wrote: > I don't believe the regexp package allows matching of bytes rather than > utf-8 sequences. > > On Sat, Dec 15, 2018 at 3:05 AM Tamás Gulácsi <tgulacs...@gmail.com> > wrote: > >> For such a simple match, I'd use two bytes.Index with an if in a for >> cycle. >> >> -- >> 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. >> > -- > 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. > -- *Michael T. jonesmichael.jo...@gmail.com <michael.jo...@gmail.com>* -- 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.