newRegExp( regexFromVerbose` (?<!\\) \s // Ignore whitespace, but not // when escaped with backslash. | [/][/] .* // Single-line comment. | [/][*] [\s\S]* [*][/] // Multi-line comment. // Note: /[\s\S]/ is same as /./s // with dot-all flag (s). `, "g", ); constregExp = regexFromVerbose` (0 | [1-9] [0-9]*) // Integer part with no leading zeroes \. // Dot [0-9]* // Fractional part (optional) ([eE] [+-]? [0-9]+)? // Exponent part (optional) `;
Name
regexFromVerbose
Example