Regular Expressions 101

Community Patterns

Latex Old Matrix Command

1

Regular Expression
PCRE2 (PHP >=7.3)

/
\\(p?matrix)([{]((?>[^{}]+|(?2))*)[}])
/
gm

Description

Used to update old latex code to use the new matrix commands for parsing by KaTeX

Submitted by funkypickle - 3 months ago