I wanted to use regex for today’s Advent of Code problem. I just guessed that there would be a regex module so I typed that and got autocomplete and started using the functions. It worked great. At one point I needed to read the docs, so I went to: https://hexdocs.pm/gleam_stdlib/gleam/regex.html. It says:
Deprecated: Please use the gleam_regexp package instead
on everything. I went to https://hexdocs.pm/ and wrote “gleam_regexp” in the search box, but nothing happened. The top 3 Google results didn’t give that package either, so I just ignored that advice and went on with my program. (Search Google again, it’s apparently the 4th result for me, but Google sucks and only displays what’s in the screenshot so in my AoC-frenzy I didn’t get it.)
After finishing Advent of Code, I checked GitHub and found this very recent (aha, that explains why I got no deprecation warnings when running – I don’t have that change yet!) commit which deprecated it: https://github.com/gleam-lang/stdlib/commit/a474dfba2393b037ce676ec3608407a285ebfca9
But it doesn’t say why. I did find some clues while writing this message though: #general message
Oh, and gleam_regexp does exist on hexdocs:
#advent-of-code message
I don’t know, I guess I figured it all out while writing this … I’m still curious why I failed to search on hexdocs though. Edit: Ooooh, you’re not supposed to use the search box, you’re supposed to just write hexdocs.pm/PACKAGE_NAME? https://hexdocs.pm/gleam_regexp/
</gleam beginner> 😊
Regular expressions in Gleam!