String matches: ^ (begine) : String Matches « String « PHP
- PHP
- String
- String Matches
String matches: ^ (begine)
<?php
$string = "PHP is ";
$pattern = "/^PHP/";
if(preg_match($pattern, $string))
print("Found a match!");
?>
Related examples in the same category