Get your own PHP server Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>Regex Modifier: o{3,}</h1>
<p>How many occurences of at least 3 preceeding o's (ooo) are in the text "W3Schools is goooooood"?:</p>
<?php
$txt = "W3Schools is goooooood";
$pattern = "/o{3,}/";
echo preg_match_all($pattern, $txt);
?>  
<p>The matches were found here:</p>
<?php
echo preg_replace($pattern, "#", $txt);
?>  
<p>(Each match was replaced by a # character)</p>
</body>
</html>

Regex Modifier: o{3,}

How many occurences of at least 3 preceeding o's (ooo) are in the text "W3Schools is goooooood"?:

1

The matches were found here:

W3Schools is g#d

(Each match was replaced by a # character)