例如我有以下字符串
$s = "asd$5asd";
我怎样才能只取包含 php 中“d”之后的“$5”的部分,我们有以下内容
preg_mach //returns int number of matches
preg_replace //returns the string with a replaced content
//---------------------
preg_grep //it greps but how to grep the "$5"
//that comes after "d" without grepping the "d" it's self ???
我的正则表达式是
/((coupon|enter)\x20code\x20)("([^"]+)")/
我想grep第四个括号的值($ 4)