Regular Expressions 101

Community Patterns

PHPDocumentor - Add missing @since tags in doc blocks

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(^\t*)(\/\*\*\n\s*\*\s.*)((?:\n\s*\*(?!\s@since).*)*)\/
/
gm

Description

This regular expression helps keeping the PHP documentation up to date by adding the @since tags in the doc block where there are none.

Submitted by raaaahman - 3 years ago