Live data from Hacker News

Show HN: RegEx for Regular Folk – A visual, example-based introduction

refrf.shreyasminocha.me

21–30 of 113 posts

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#21
post #5

Neatly presented. However, I'd suggest to reorganize the chapters so that features not yet introduced aren't shown in examples without explanations. For example, you explain anchors and quantifiers many chapters later but use them liberally in earlier chapters without explaining them.

Yep, thanks for pointing that out. I was finding it tricky to present features in isolation without making the examples trivial.

I'll work on making things clearer.

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#23
post #19

Lots of praise here, so I won't re-iterate the good points (presentation, pleasant tone, good structuring) and will head straight to the meat of my issue with the title: This is not a book for regular folk. A regular HN reader, sure. A technically inclined interested party who wants to break the ice with Regexes, sure. But not regular folk. Here is what I'm talking about: > Introduction > Regular expressions (“regexe…

Valid points. I agree.

I'll try easing the curve, especially early on and make clearer the intended audience.

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#25
post #5

Neatly presented. However, I'd suggest to reorganize the chapters so that features not yet introduced aren't shown in examples without explanations. For example, you explain anchors and quantifiers many chapters later but use them liberally in earlier chapters without explaining them.

Yep, thanks for pointing that out. I was finding it tricky to present features in isolation without making the examples trivial. I'll work on making things clearer.

I wouldn't worry too much about making the examples trivial. That just makes it easy to learn! There are probably lot's of good orders, but I'd probably go something like:

- Literal strings - Optional characters - Optional strings of characters (using groups) - Alternations (using groups) - Repetitions (using groups)

Then move onto to things like character classes.

IMO character classes are quite an advanced feature (or at least confusing for beginners) because of being character orientated. They also don't tend to very useful unless you've already covered repetition.

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#27
post #10

I like the example based approach. I learn from examples far quicker than I learn from “explanations”. If I attempt to learn from an example and my brain hits an exception, only then do I start reading the supporting text. Nice approach. You’ve made a valuable thing and implemented a powerful idea.

I honestly wish a lot more documentations started like that with a bunch of examples. I think one I really enjoyed recently was attrs [0].

[0] https://www.attrs.org/en/stable/examples.html

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#29
Decent guide. It's great that all the examples are linked to https://regex101.com/ so people can play/explore!

More regex resources I rely on:

http://www.regexr.com/

https://gchq.github.io/CyberChef

https://regexper.com/#.%3F%5Bv%2Ci%5D.*

https://cheatography.com/davechild/cheat-sheets/regular-expr...

Re: Show HN: RegEx for Regular Folk – A visual, example-based introduction

#30

Decent guide. It's great that all the examples are linked to https://regex101.com/ so people can play/explore! More regex resources I rely on: http://www.regexr.com/ https://gchq.github.io/CyberChef https://regexper.com/#.%3F%5Bv%2Ci%5D.* https://cheatography.com/davechild/cheat-sheets/regular-expr...

The examples are linked to RegExr! There's a link titled `[RegExr]` in blue next to each example.

Also, those are some amazing resources, especially CyberChef.

Post reply on HN