Skip to content

Comment on AutoRegex

Comments

    All words starting with the letter "n" and ending with "g", case insensitive
    >> /^nw*g$/i
This is not right. That should be a "\w" instead of "w".

Same with the last one, it should be \d instead of d. Seems like an escape character issue.

It's otherwise wrong, too. It shouldn't have ^ or $, and \w matches non word characters. It should be /n[a-z]*g/gi

AboutSource Built by g1lg1l

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