regextypst

How do I match text between angle brackets in Typst?


I am using the following regex:

#show regex("<.+>"): highlight

But it doesn't work. A single < correctly matches angle brackets but as soon as I type any other character it doesn't match anything. For example, I have the following text:

\<20...

But the regex <20 doesn't match this either.

MWE

#show regex("<.*>"): highlight

\<#lorem(10)\>

Expected output: expected output

Actual output actual output


Solution

  • It turns out this is a well-known bug in Typst. See here.