Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Improving with Regex Exercises [closed]

Tags:

regex

Currently i am reading a book Regular Expressions. The book is very very detailed. Although it gives examples while explaning the subjects it is hard to learn without doing a good amount of exercises/practices.

So, can you suggest a site, a book, a place for regex exercises, so that i can solve them and help myself to absorb regexes while reading the book?

like image 706
user1002601 Avatar asked May 17 '12 14:05

user1002601


People also ask

Why is regex so difficult?

Density. Regular expressions are dense. This makes them hard to read, but not in proportion to the information they carry. Certainly 100 characters of regular expression syntax is harder to read than 100 consecutive characters of ordinary prose or 100 characters of C code.

Does regex affect performance?

Being more specific with your regular expressions, even if they become much longer, can make a world of difference in performance. The fewer characters you scan to determine the match, the faster your regexes will be.

How long does it take to learn regex?

One could say it takes 20 minutes to learn, but forever to master. In this guide, you learn the basics of regex. We are going to use the regex online playground in regexr.com. This is a super useful platform where you can easily practice your regex skills with useful examples.


1 Answers

Take a look at Zed Shaw's Learn Regex the Hard Way. It's free and the author provides a hands on way to incrementally learn the topic through exercises.

After that, you can go back to your current reading or move on to Mastering Regular Expressions if you want to dive into more details, or the Regular Expressions Cookbook for problems and solutions.

like image 136
Ahmad Mageed Avatar answered Oct 23 '22 21:10

Ahmad Mageed