Regular Expressions 101

Community Patterns

1...34567...879

NPC名称匹配

1

Regular Expression
PCRE (PHP <7.3)

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

Description

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

Submitted by vicrly - 4 months ago