<html>
<body>
<h1>Regex Modifier: [e-o]</h1>
<p>How many letters in the text "Welcome" are alphabetically between "e" and "o":</p>
$txt = "Welcome";
$pattern = "/[e-o]/";
echo preg_match_all($pattern, $txt);
<p>The matches were found here:</p>
echo preg_replace($pattern, "#", $txt);
<p>(Each match was replaced by a # character)</p>
</body>
</html>
How many letters in the text "Welcome" are alphabetically between "e" and "o":
5The matches were found here:
W##c###(Each match was replaced by a # character)