zet

Learning ed is Way Better than Regex Golf

I’m realizing that learning ed — particularly the g/ command, the parent of grep — is a way more effective use of learning time than playing around with regular expression golf. You can create a simple buffer and edit it, then use different commands to see if you can successfully modify the buffer and match several lines at a time. I would never have seen that coming had I not played around with in for an hour or two. The regular expressions learned are of the BRE and ERE versions, same as grep so they immediately apply to everything else a person learns about the command line (unlike PCRE, which are included in pretty much every programming language, and are easy to pickup once a person has learned ERE).