Skip to content

Comment on Indices Point Between Elements

Comments

When you talking about where zero-width regexes match, this mental model certainly helps, and I find it consistent otherwise too.

zero-width matches (and empty lines) were a huge source of stupid edge-case bugs in livegrep[1], and being rigorous about maintaining this mental model definitely helped a lot.

[1] livegrep.com

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.