作者zi (Play, Now)
看板PHP
標題Re: [問題] 不包含連續字串XXX
時間Mon Jun 30 16:34:22 2008
原po的意思應該是
$s1 = "this is not ok";
$s2 = "this is ok";
$r1 = preg_match($pat, $s1, $m);
$r2 = preg_match($pat, $s2, $m);
求 $pat 使得 $r1 = 0 且 $r2 = 1
話說這個問題也是困擾我很久..:Q
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.116.225.185
→ ihs :yes..解釋得好..thx! 06/30 17:19
推 alpe :$pat = '/this is ([^not])?\ ?ok/'; 06/30 18:07
→ alpe :是要這樣嗎??? 飄走 06/30 18:08