When Will You Ever Use Regex?

By now you are probably thinking, “I never want to see another regular expression again. My head hurts.” Or maybe you’re thinking, “Wow! I <3 regular expressions!” I’m guessing it’s not the latter. Either way, you’ve learned a lot about regular expressions, and you might be wondering about when and how you will actually use them. The following examples are a few of the ways that I have actually used regular expressions to make my work easier (for real, regular expressions can actually make life easier, not harder).

Get Learning to Program now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.