Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Learn Regular Expressions with simple, interactive exercises (regexone.com)
144 points by pusv 19 days ago | hide | past | favorite | 26 comments

This was posted by a spam ring. The site has been submitted many times (https://news.ycombinator.com/from?site=regexone.com).

Would you please stop this? You're wasting your time. We ban these accounts and everything that you try to promote with them. Karma doesn't help.

This is one of the best online learning experiences I've ever had. I went through it twice and never felt uncomfortable with regular expressions afterwards. The author also does this for SQL, which I haven't tried: https://sqlbolt.com/

Are there any other online learning courses like this?

A few others are CSS Grid Garden [0] and Flexbox Froggy [1], both multi-level games that teach CSS grid and flexbox techniques with one new concept per level. There's also Flexbox Zombies [2] which requires signup but is still fun and free.

0: https://cssgridgarden.com/

1: https://flexboxfroggy.com/

2: https://geddski.teachable.com/p/flexbox-zombies

Great examples of how Video Games Are The Future of Education (https://news.ycombinator.com/item?id=23593872)

Agreed. Went through it twice and that combined with a bit of real-world practice made me pretty proficient at RegEx.

Fantastic site.

It's really nice and well thought out.

I am curious who did these? Why would they choose to remain anonymous?

SqlBolt is fantastic. I got an entire team up to speed in sql by having them go through it.

Also https://regexcrossword.com/

Very good practice to reinforce fundamentals after you're done regexone

I second this recommendation.

You need a lot of practice for a new language to stick and once you’ve done your first 1-2 tutorials and feel like you get kinda get it, actual tasks involving regex will seem far and between, but these crosswords are a great way to crystallize your new learnings.

And also fun to do!

I recommend https://alf.nu/RegexGolf for timewasting

If this is your site, my feedback is, to have a more clear cut destinction between the explaination and the task at hand.

should be right, as it is "Show HN", although [0] indicates this site has been submitted previously under different usernames

I'd add some more feedback:

* Add some detail about which regex flavor is used for the lessons, if they are meant to be common features between the flavors listed under 'References & More', again, mention it somewhere. For example, someone trying to learn regex for grep/sed/awk will discover that `\d` will not work.

* I get that the lessons are not meant to cover everything, for example lookarounds/non-greedy/backreferences aren't covered, but I'd feel word boundaries after the line anchors would make a good addition. Edit Some of these are covered in lesson 15, but that is not linked in the sidebar under 'Lesson Notes'

[0] https://hn.algolia.com/?q=regexone

When you finish all the lessons, then you'll have two problems.

Not to sound dismissive, but virtually everyone, who knows what are regular expressions, knows this. Only last, 15th, lesson starts to touch on things that are arguably not common knowledge - word boundaries and back references. Look aheads and look behinds, the parts which most people struggle with, aren't covered at all.

I was going to post, "that's too bad, there's already an excellent one out there." Yep, this is how I learned regex. In fact, I don't even worry about forgetting regex, since 10 minutes on this and I have most of what I need.

Excellent, excellent website.

It's a cool presentation. Careful, however, this only teaches a specific variant of regexes (the PCRE ones). Those are common, but expressions like "\d" won't work in grep, sed, or many other tools. I wish it had noted the variances.

One mnemonic that stuck with me: you can remember the start and end characters (/^foo$/) by imagining an animal, like a rhino: the ^ is the horn at the front, the $ is the long curvy tail at the end.

Worth it, so you can fly in on a rope and save the day.


(Yeah, I know you've seen it before. But 10,000 people/day haven't. https://xkcd.com/1053/)

You should fix the checker to match the whole strings, not just substrings. One can pass the following example with just \. : Match cat. Match 896. Match ?=+. Skip abc1

Thanks for sharing. Hope it helps some people out.

I took a look at it and have a small nitpick: you refer to the '\' character as "slash". See Lesson 2 for example.


I'm not a RegEx expert, but I've googled them enough to have the basics. This is exactly what I needed to improve my skills.

https://regexr.com/ is another good site for testing your RegEx.

I like the way regexr highlights the regex matching, display with nested boxes.

I just read man re_format but that's a lot more fun

outstanding - I've struggled with regex, the capture group lesson was illuminating

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact