Regular Expressions 101

Community Patterns

Community Library Entry

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 - a year ago