Live data from Hacker News

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

refrf.shreyasminocha.me

31–40 of 113 posts

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

#31

This is looking great. Thank you.

Also, I rely on https://regexr.com/ for interactive RE debugging.

Me too! There are links to RegExr next to each example. Glad they have query string support.

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

#32
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.

Examples being greater than explanations is one of the main reasons I emphasize explanative error messaging, clear simple typings, and verbose function/variable names over documentation.

Docs are really good for discovery and should cover many topics shallowly so you can glean a big picture quickly. I generally don't like going to them for specs that could have just been an error message, a type, or a better naming convention.

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

#36

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.

Corrected! (Covid brain) Thanks.

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

#39
Just some 2cent feedback - don't assume anything is known.

The BASIC lesson doesn't mention anything about /g. Having not touched regex in years I had no idea what that was and kept thinking 'why isn't he showing it matching a g if he has that in the example'.

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

#40
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.

Yes - in the Character classes chapter you had just introduced the negate operator, then in the next example use the beginning operator, which happens to be the same character in a different context. That might be a leap too far. Great resource!
Post reply on HN