Comment

Comment by Daneel_

How so?

Start of line “^”, then an “n”, then any word characters zero or more times (\w*), then a “g”, then the end of the line “$”. The surrounding slashes are convention for certain regex languages, and the last “i” turns on the case insensitive flag.

Personally I’d write this as “(?i)\bn[a-z]*g\b” but there’s many approaches for many different situations.

parent Daneel_ 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton