An interesting regex — Parsing out template constructor strings for Mad Libs
/\[.*?\]|[a-z0-9']+|[^a-z0-9'\[\]\s]+|\s+/ig
In September 2022, I was part of a small team that built Mad Libs, an application that reimagines the popular word game in a browser-based forum/blog context. Among other features, the app includes:
- A template maker, in which a user inputs a constructor string that is converted to a Mad Libs template that other users can then fill in