Live data from Hacker News

Learn RegEx step by step, from zero to advanced

regexlearn.com

1–10 of 114 posts

Re: Learn RegEx step by step, from zero to advanced

#2
I like the way you teach them by an interactive training. I have only spent few minutes and really understand why I have copied and pasted that thing from Stackoverflow. If you start with a challenge from a complex log file, it makes it easy to learn by providing extra motivation.

Re: Learn RegEx step by step, from zero to advanced

#3
I have learned regex, I learned it from regexone years ago so appreciate this type of teaching method. What I will say though it it's a little pedantic if you won't let me move on despite my solution being correct. An example is this:

[dbf]eer

When the answer required was (if I remember correctly):

[bdf]eer

I think as long as you're correct you should be allowed to move on. By all means show your preferred solution.

Re: Learn RegEx step by step, from zero to advanced

#4
Site looks cool. Good to see you've made it interactive.

Seems like you are supporting JS flavor, that should be mentioned prominently.

Suggestions for the cheatsheet:

1) Multiline example regex is missing the anchors

2) Negative lookbehind should be `(?3) `+` and `*` examples are using `()` around a character, which isn't needed (the `?` example doesn't use it)

Re: Learn RegEx step by step, from zero to advanced

#7
This looks nice but is telling you what to do, instead of giving you problems to solve. I don't think this is a good method of teaching.

Edit: After lesson 8 you start to get problems to solve

Edit 2: I take it back, this is the first time I've understood how lookarounds work. Great stuff!

Re: Learn RegEx step by step, from zero to advanced

#8
>Regular Expressions, abbreviated as RegEx or RegExp, are a string of characters created within the framework of RegEx syntax rules. You can easily manage your data with RegEx, which uses commands like finding, matching, and editing. Regex can be used in programming languages such as Phyton, SQL, Javascript, R, Google Analytics, Google Data Studio, and throughout the coding process. Learn regex online with examples and tutorials on RegexLearn now.

I always look at these intros/descriptions of Regex with a heavy heart. They describe what regex's are, but none of the info is going to make much sense to someone who doesn't already know why they would want to learn them.

The best motivation for regexes that I've read is actually from a Python Tutorial [0] where the author gives an example of writing a lot of nested 'if' statements that could all be solved by a single regex. On the whole, I think regexes are one of the most powerful tools that doesn't have enough publicity in large part due to this Catch 22 of trying to explain what they are.

[0] https://automatetheboringstuff.com/chapter7/

Re: Learn RegEx step by step, from zero to advanced

#9

I have learned regex, I learned it from regexone years ago so appreciate this type of teaching method. What I will say though it it's a little pedantic if you won't let me move on despite my solution being correct. An example is this: [dbf]eer When the answer required was (if I remember correctly): [bdf]eer I think as long as you're correct you should be allowed to move on. By all means show your preferred solution.

What's also a bit of a pain is when you click Show Solution you still have to type it in the box to continue.

Apart from that I love it! I normally use regexr.com and just mess around with it until I get the desired result. It also helps with learning, but you end up never truly understanding the concepts.

Re: Learn RegEx step by step, from zero to advanced

#10

This looks nice but is telling you what to do, instead of giving you problems to solve. I don't think this is a good method of teaching. Edit: After lesson 8 you start to get problems to solve Edit 2: I take it back, this is the first time I've understood how lookarounds work. Great stuff!

That's what it starts out, then it tests you with some problems to solve based on what you learned before.
Post reply on HN