Regular Expressions 101

Community Patterns

match @access phpdoc tags

0

Regular Expression
PCRE2 (PHP >=7.3)

/
[ |\t]+\*\s+@access\s+(?:private|protected|public)\n
/
gm

Description

used for finding old skool @access tags in method phpdoc comments. any amount of whitespace can exist before * and before scope identifier

examples:

    * @access    public
Submitted by anonymous - 3 years ago (Last modified 3 years ago)