logoalt Hacker News

ogogmad • yesterday at 11:02 AM • 2 replies • view on HN

Really cool. Do you teach people the mechanics, like what the app shows? Because I wonder if that actually makes it harder. I'm wondering about where the hard bits are, given that it all boils down to just:

  "|", which means "or"
  ".", which means "any symbol"
  "?", which means "at most once",
  "*", which means "however many times"
  "+", which means "at least once"
Maybe encountering it next to PEG scrambles your brain.

Replies

froh • yesterday at 4:12 PM

add to that

- using groups "(" .. ")" in replacement "\"i

- character ranges "[" .. "]"

- character classes "[:" .. ":]"

- multiline match

- ignore case

- beginning / end of line / word