關于模式匹配
$this->returnMatchResult ?
??????????????? preg_match_all($pattern,$subject,$matches):$
??????????????? $this->isMatch=preg_match($pattern,$subject)===1;
??????????? return $this->getRegexResult;
老師,這段代碼不太懂,能幫忙解釋下嗎
$this->returnMatchResult ?
??????????????? preg_match_all($pattern,$subject,$matches):$
??????????????? $this->isMatch=preg_match($pattern,$subject)===1;
??????????? return $this->getRegexResult;
老師,這段代碼不太懂,能幫忙解釋下嗎
2016-05-30
舉報
2016-05-30
這個工具類,封裝了兩種返回形式,第一種是返回匹配的字符結果,第二種是“是否匹配”。屬于工具類的風格