Follow

In JavaScript the "empty" regular expression literal is written `/(?:)/` since the parser would erroneously take `//` as the start of a single-line comment

ecma-international.org/ecma-26

@YesIKnowIT or `new RegExp("")` is equally valid, if not as elegant

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!