Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2022-05-29 23:26
Flavor·PCRE2 (PHP)

/
(?<summary>^.+?[a-z\d]{2,}[^\w]?[.?!])(?:\s|$)
/
img
Open regex in editor

Description

Using to extract PhpDoc summary. Note: PhpDoc must be trimmed at left (' ' and '*' are removed).

Submitted by WinterSilence