| Context | Example | String / coerced | Pattern | RegExp |
|---|---|---|---|---|
| Default | regex`${'^.+'}` |
β’ Sandboxed β’ Atomized β’ Escaped |
β’ Sandboxed β’ Atomized |
β’ Sandboxed β’ Atomized β’ Backrefs adjusted β’ Flags localized |
Character class: [β¦], [^β¦], [[β¦]], etc. |
regex`[${'a-z'}]` |
β’ Sandboxed β’ Atomized β’ Escaped |
β’ Sandboxed β’ Atomized |
Error |
Interval quantifier: {β¦} |
regex`.{1,${5}}` |
β’ Sandboxed β’ Escaped |
β’ Sandboxed | Error |
Enclosed token: \p{β¦}, \P{β¦}, \u{β¦}, [\q{β¦}] |
regex`\u{${'A0'}}` |
|||
Group name: (?<β¦>), \k<β¦>, \g<β¦> |
regex`β¦\k<${'a'}>` |
regex be called as a function instead of using it with backticks?regex('g')`β¦` rather than regex`/β¦/g`?