Reg Exp matching multiple instances
I have to match multiple instances of either "int(" or "der("
So the expression must match these strings
VVEH + int(ACC_X) + der(FL_WSP)
VVEH + int(ACC_X) + i开发者_开发百科nt(FL_WSP)
VVEH + der(ACC_X) + der(FL_WSP)
and not these
VVEH + int(ACC_X) + log(FL_WSP)
VVEH + der(ACC_X) + log(FL_WSP)
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
精彩评论