String match demo Example : String Matches : String PHP Source Code


PHP Source Code » String » String Matches »

 

String match demo Example




<?php
     $string = "Cats coat dog date dig daughter catagory";
     $pattern = "/[cd][oa][gt]/";
   
     if(preg_match($pattern, $string))
          print("Found a match!");
?>
           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo String
» String Matches