たとえば、次の文字列があります
$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)("([^"]+)")/
4番目の括弧の値をgrepしたい($ 4)