search

Home  >  Q&A  >  body text

Regular expression "." Please answer. Thank you.

<?

$zz = '/gg.gg/';

$string = "ABC1ABC";

$if(preg_match($zz, $string,$matches)){

echo 'Matched, the result is:';

var_dump($matches);

}else{

echo 'No match';

}

?>

Why the match failed, I don't understand. . .

phpcn_u10161phpcn_u101612691 days ago1510

reply all(2)I'll reply

  • nearest

    nearest2017-07-25 13:48:05

    $string = "ggABC1ABCgg";

    reply
    1
  • phpcn_u10161

    I haven’t turned around yet, but I understand now. Thank you~

    phpcn_u10161 · 2017-07-25 14:23:59
    益伦

    Reply to phpcn_u10161: What does it mean? I still don’t understand this example?

    益伦 · 2017-10-24 22:37:37
    nearest

    come on

    nearest · 2017-07-25 17:19:35
  • PHP中文网

    PHP中文网2017-07-22 09:11:28

    What the hell is '/gg.+gg/'?

    reply
    0
  • phpcn_u10161

    This is what the course looks like

    phpcn_u10161 · 2017-07-22 22:48:22
  • Cancelreply