Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^\h{4}[^\(\n]+\((.*)\)$
/
gm

Description

^\h{4}段首4个横向空格 [^(\n]+不包含左括号、换行符号的其他字符,1~无限循环 ((.*))$捕获处于()之中的任意字符内容,右括号在段尾

Submitted by vicrly - 9 months ago