In this video we take a gentle dive into regular expressions as we solve the Acronym exercise. We look at the most basic solutions (such splitting on whitespace) and end up with unicode and negative lookbehinds. We finish off by looking at some other approaches to Acronym including state machines!
Sit back and enjoy 45mins of learning with Jeremy and Erik, then go solve the exercise in your favourite way on Exercism.
Solve the exercise at: https://exercism.org/exercises/acroynm
Join #48in24 at: https://exercism.org/challenges/48in24
Featured solutions:
https://exercism.org/tracks/awk/exerc...
https://exercism.org/tracks/nim/exerc...
https://exercism.org/tracks/elm/exerc...
https://exercism.org/tracks/zig/exerc...
https://exercism.org/tracks/go/exerci...
Timestamps:
00:00:00 Introduction
00:00:56 String splitting
00:05:36 Basic Regex
00:20:42 Unicode in Regex
00:29:38 One Regex to rule them all
00:41:56 Fields in AWK
00:43:49 Pipeline in Elm
00:45:28 Splitting using Sets in Nim
00:47:09 Tracking Chars in Zig
00:51:08 State machine in Go
00:53:16 Conclusion