Comment

Comment by catblast

That's not really true. The guide seems to be javascript centric. The slash and flags is not part of the regex, it's a delimiter. In certain contexts like sed, perl, php, an arbitrary delimiter can be used to avoid needing to escape slashes. If you pass a string to a regex engine with a /, it does what you would expect, match a literal /. For instance, python and grep does not interpret slashes and flags. Those are pretty common.
parent catblast 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton