Write and Program Better and Faster with Regex

Regular Expressions is a huge untapped computer skill, and learning it won’t take long.

What is it?

Regular Expressions (Regex) is a tool for searching text. It’s great for finding patterns, looking for mistakes, and more. Learning it all is unnecessary, the basics are enough for most people.


How I’ve used it

I was in a programming competition, there was thirty minutes left on the clock, we were doing okay but not going to win. The competition had ten questions with multiple parts in each, we had to solve as many as we could before the time ran out. They told us we could use any tool we had except the internet. One questions was about DNA, it said the DNA is encoded as a sequence of letters, but some letters meant it might be one letter or another (eg. “C” means that you’re not sure if it’s “B” or “A”). In my head a lightbulb flicked on, and we scored heaps of points at the end of the competition. All we needed was simple Regex. We typed it in and found the pieces we needed and it took us a few minutes. We came second place in the state-wide competition.

Learning Regex is easy, I used RegexOne when I started. For anyone who works with text, learning this is a no-brainer.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s