<html>
<body>
<h1>正则表达式修饰符:[T-e]</h1>
<p>在文本 "Welcome to W3School" 中,有多少个字母在大写 "T" 和小写 "e" 之间?</p>
$txt = "Welcome to W3School";
$pattern = "/[T-e]/";
echo preg_match_all($pattern, $txt);
<p>匹配到的位置如下:</p>
echo preg_replace($pattern, "#", $txt);
<p>(每个匹配项被替换为 # 字符)</p>
</body>
</html>