<p dir="auto">Regular expressions that include a Unicode category matcher throw an error, while they work fine in Node and in Chrome.</p>
<p dir="auto">Example:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;0a&quot;.match(/\p{L}/u);"><pre class="notranslate"><span class="pl-s">"0a"</span><span class="pl-kos">.</span><span class="pl-en">match</span><span class="pl-kos">(</span><span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">\p<span class="pl-kos">{</span>L<span class="pl-kos">}</span></span><span class="pl-c1">/</span>u</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Expected output:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[ 'a', index: 1, input: '0a', groups: undefined ]"><pre class="notranslate"><span class="pl-kos">[</span> <span class="pl-s">'a'</span><span class="pl-kos">,</span> <span class="pl-s1">index</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-s1">input</span>: <span class="pl-s">'0a'</span><span class="pl-kos">,</span> <span class="pl-s1">groups</span>: <span class="pl-c1">undefined</span> <span class="pl-kos">]</span></pre></div>
<p dir="auto">Actual output:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;unknown&gt;:1:5
&quot;0a&quot;.match(/\p{L}/u)
     ^
Uncaught SyntaxError: Invalid regular expression: /\p{L}/: Invalid property name
    at &lt;unknown&gt;:1:6
    at evaluate (js/repl.ts:87:34)
    at replLoop (js/repl.ts:145:13)"><pre class="notranslate"><span class="pl-c1">&lt;</span><span class="pl-ent">unknown</span><span class="pl-c1">&gt;</span>:1:5
"0a".match(/\p<span class="pl-kos">{</span><span class="pl-v">L</span><span class="pl-kos">}</span>/u)
     ^
Uncaught SyntaxError: Invalid regular expression: /\p<span class="pl-kos">{</span><span class="pl-v">L</span><span class="pl-kos">}</span>/: Invalid property name
    at <span class="pl-c1">&lt;</span><span class="pl-ent">unknown</span><span class="pl-c1">&gt;</span>:1:6
    at evaluate (js/repl.ts:87:34)
    at replLoop (js/repl.ts:145:13)</pre></div>
<p dir="auto">I brought this up on Gitter and it was suspected to be due to the lack of ICU.</p>
<p dir="auto">As seen in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="422116599" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1952" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1952/hovercard" href="https://github.com/denoland/deno/issues/1952">#1952</a> / <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="405562913" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1636" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1636/hovercard" href="https://github.com/denoland/deno/issues/1636">#1636</a> ICU needs to be added in Deno build.</p>
<p dir="auto">Switching this flag to true maybe: <a href="https://github.com/denoland/deno/blob/master/.gn#L50">https://github.com/denoland/deno/blob/master/.gn#L50</a> ?</p>
<p dir="auto">ref: <a href="https://v8.dev/docs/i18n" rel="nofollow">https://v8.dev/docs/i18n</a></p>