Now it says:
“The literal word Special, followed by a colon, followed by exactly 1 character in the range A-Z, followed by zero or more characters in the range a-z, followed by a colon”.
(Hint: Why does that sentence not match “Special:cool:”)
Right, so I can see where you’re confused, and why it’s not working.
Look at the ACTUAL HTML of those links you’re seeing on that page.
<li>
<a href="/wiki/Special:SpecialPages" title="Special:SpecialPages">Special:SpecialPages</a>
: a list of most special pages currently available to all users.
</li>
The text content of these nodes do not match your Regex. In fact, they fail it twice.
Why?
/Special:[A-Z][a-z]*:/
First of all, SpecialPages contains 2 capital letters; your pattern only allows for 1, at the beginning. The P in Pages will cause the regex not to match.
Secondly, the colon on the end. Note where the Anchor tag ends. It does not include the trailing colon. So it won’t match your pattern either. The trailing colon is not part of any textcontent of any of the anchors.
This is the first time I learn the term “trailing colon” A Google search for trailing colon didn’t yield a general explanation so there probably is some context here.
You probably meant the last colon in the pattern but why wasn’t it matched?
Should I even match it due to the following whitespace character?