RegEx for Regular Folk

Learning and science

interactive tutorial

SHOW HN2020

502points
108comments
#51of 3,028 in 2020
Top 2%of 2020 by points

How HN took it

MixedNo clear lean

20 positive, 10 neutral or asking, 9 mixed, 10 critical, out of 49 comments about the project. Thread score +0.24.

Docs: 13 for, 5 againstDesign: 4 for, 0 againstIdea: 2 for, 0 againstExecution: 0 for, 2 againstPricing: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Example-based approach is clear and well chosen

    From 3 comments
    • 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…
      LeonB on HN
    • This looks like a great resource! Like others, I vastly prefer an example-based style, and the examples are really well chosen and very illustrative. I generally think I know my…
      twicetwice on HN
    • Very clear and concise with simple presentation. Good job!
      phillipseamore on HN
  • Good for teaching beginners

    From 2 comments
    • I started teaching Python to my GF(she is working from home and now has plenty of time to do some extra learning). She is not a programmer and I have been giving her small…
      120bits on HN
    • I love this! I love RegEx but have struggled trying to “teach” others over the years. In addition to books like this, I often find writing RegEx with something like…
      filmgirlcw on HN

Objections

  • Uses regex syntax before explaining it

    From 3 comments
    • Your examples use * and $ and + before they are explained. Inductive learning goes smoother if new concepts have context. You explain [^ ...] So the use of these examples without…
      ggm on HN
    • 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…
      asicsp on HN
    • Hi, very nice RegEx educational site/book. Feedback: - In the chapter https://refrf.shreyasminocha.me/chapters/character-classes an example is given which uses: ``` o ^ character…
      nobrains on HN
  • Introduction too short and jargon-heavy for non-programmers

    From 2 comments
    • 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…
      Zhyl on HN
    • Constructive criticism: I was about to send this to a friend who is new to programming, but the introduction is just too short. It would be great if the introduction included one…
      backzerman on HN
  • Next navigation links broken

    From 3 comments
    • Hey this is great! I noticed that in the "Escapes" chapter, the "Next" link at the bottom of the page goes back to the introduction when it should go to "Groups". I poked around…
      appleflaxen on HN
    • Feedback: the “next” link on this page just takes you back to that same page https://refrf.shreyasminocha.me/chapters/introduction
      jamesrcole on HN
    • It seems the “next” button is not working on mobile safari on ios 13. It just reloads the page you’re in. Tried with and without content blockers. However from what i quickly…
      asutekku on HN

Requests

  • Show how to execute regex in code

    From 1 comment
    • This looks really nice but I think it suffers from the same issue a lot of regex tutorials suffer from. It's focusing solely on the regex and not at all on how to actually…
      saberworks on HN
  • Printable single-page version

    From 1 comment
    • Nice guide! As a complete regex-dyslectic i didn't know the slash '/' could be used to make expressions more readable. On another note, since this is supposed to be a book and…
      olq on HN
  • Explain the /g flag earlier

    From 2 comments
    • 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…
      evo_9 on HN
    • This is nicely done. It could benefit from some non /g examples on the basics page, especially since flags are not covered until chapter 8. One visual enhancement that could be…
      donaldihunter on HN

Questions

  • Is there a tool showing where a regex fails partway through matching?

    From 1 comment
    • Nice intro. Tangential question. Is there a regex tool that shows where the expression failed ? Not in syntax, but the logical failure point? Would be useful for when an…
      binstub on HN

Alternatives named

  • regex101.com

    From 2 comments
    • Does this help? https://regex101.com
      spdustin on HN
    • https://regex101.com/ This site is my goto whenever I need to write a complex regex. It's got syntax highlighting, explanations and a tested all rolled into one!
      sakekasi on HN
  • RegExr

    From 2 comments
    • 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/…
      canada_dry on HN
    • RegExr [0] does a great job of showing individual highlights even when they are in a sequential string. You can try to implement this if you want instead of showing a callout…
      shanecoin on HN
  • Expressions app

    From 1 comment
    • I love this! I love RegEx but have struggled trying to “teach” others over the years. In addition to books like this, I often find writing RegEx with something like…
      filmgirlcw on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/23042079)