You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
compiler: interpolation ends early when a regular expression literal contains }} #71915
Hi Angular team! Angular treats }} inside a regular expression literal as the end of an interpolation.
Minimal reproduction
{{ /[}}]/u.test('}') }}
Expected true. Actual Unexpected closing block. The same expression fails in a title interpolation with Unterminated regular expression but parses successfully in a property binding. The equivalent pattern /[}]/u also parses in interpolation. AOT compilation with ngc reports NG5002 for {{ /}}/.test('}}') }}.
Cause and possible fix
The scanners appear to treat }} inside the regex as a closing delimiter. A possible fix is to skip regex literal contents while preserving division expressions such as {{ 6 / 2 }}. HTML lexer · Expression parser
Environment
Angular compiler 22.2.5, Node.js 24.22.2, macOS arm64. Regression status unknown.
Activity
crisbeto commentedon Nov 10, 2026
I suspect this is the same root cause as #9571.
atscott commentedon Nov 10, 2026
#9571 already tracks the two-phase interpolation-boundary limitation.