Hacker News new | ask | show | jobs
by catblast 2243 days ago
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.
1 comments

Thanks for the heads up, it seems i have some more reading to do :)