note
Joost
You're not matching for the "/XX" part, and the second regex also matches whatever the first matches.
<p>
A relatively simple (and too permissive) regex would be:
<code>
if ($qs =~ /^[a-zA-Z0-9][a-zA-Z0-9\.\-_]*(\/\d+)?$/) {
# do stuff with $qs
}
</code>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-157432">
<em>[id://149675|"What should it profit a man, if he should win a flame war, yet lose his cool?"]</em>
</div></div>
513811
513811