Can't believe it's taken me this long to come across this method. Ever since I've found out about it, I've used it about three times already. And I only found out about it yesterday. The last time I ever used something even close to this was during my C
days in University. It's a super easy method to capture things from a string with a pattern. One more reason to not use Regex. I have nothing against Regex, but I don't understand it. It all seems like magic to me. It's one of the only reasons I don't like to use it. To the point that I avoid it like the devil. If I do end up using it, I ensure it's the simplest form of it, and I understand it.
Anyway, that's all I wanted to say for today. It's my new favorite method. I'm glad I found it. After finding this out, I went to the documentation to see other gems in there. I also found fmt.Appendf
, it's neat method too.
Also, it's thank to the AI that I found it. Never would have thought to capture digits from a pattern this way.