DXN regex (~r/pattern/flags, Erlang :re/PCRE-style semantics).
Not compiled to a native RegExp on decode — x (extended/verbose
whitespace-and-comments mode), f (firstline), and r (ungreedy)
have no JS RegExp equivalent, so this class keeps the raw
pattern/flags data instead, the same way Regex.t() wraps Erlang
:re options rather than any single compiled form. i/m/s/u
map 1:1 to native flags — toRegExp() succeeds only when none of
x/f/r are set, rather than silently dropping them.
only when x/f/r are all unset — those have
no native RegExp equivalent, so this throws rather than produce
a RegExp that silently drops part of the pattern's meaning.
DXN
regex(~r/pattern/flags, Erlang:re/PCRE-style semantics). Not compiled to a nativeRegExpon decode —x(extended/verbose whitespace-and-comments mode),f(firstline), andr(ungreedy) have no JSRegExpequivalent, so this class keeps the raw pattern/flags data instead, the same wayRegex.t()wraps Erlang:reoptions rather than any single compiled form.i/m/s/umap 1:1 to native flags —toRegExp()succeeds only when none ofx/f/rare set, rather than silently dropping them.