我必须匹配“int(”或“der(”
)的多个实例因此表达式必须匹配这些字符串
VVEH + int(ACC_X) + der(FL_WSP)
VVEH + int(ACC_X) + int(FL_WSP)
VVEH + der(ACC_X) + der(FL_WSP)
而不是这些
VVEH + int(ACC_X) + log(FL_WSP)
VVEH + der(ACC_X) + log(FL_WSP)
答案 0 :(得分:1)
VVEH( \+ (int|der)\([^)]+\)){2,}
VVEH #Initial string
(
\+ #Escape the 'plus'
(int|der) #Either of your function names
\( #Escape the bracket
[^)]+ #Match anything inside the brackets
\) #Escape the bracket
){2,} #All of that stuff above at least twice