Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<?php
$str = "Apples and bananas.";
$pattern = "/ba(na){2}/i";
echo preg_match($pattern, $str);
?>
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_regex_grouping by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:22:24 GMT -->
</html>
1