Regular Expressions 101

Community Patterns

VSCode TODO Tree regex

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(\/\/|#|<!--|;|\s?\*\s?|^|^\s*(-|\d+.))\s*(NOTE)
/
gm

Description

Little tweaks to highlight tags in docblock comments also:

/*

  • NOTE */

// NOTE: lorem ipsum

Submitted by ced404 - 8 months ago