Your RegEx also matches if there are wrong characters in the page URI as it doesn’t enforce that the character group has to match from the beginning (^) to the end ($).
However, as I wrote, actually checking if the page exists as in my example above is a better and more robust solution anyway.
i see. thanks for explaining about the character group. so on regexr i should only check a single uri not multiple vairants at once. i was able to verify your expression on regexr now.
What you could also do at RegExr is to enable the “multiline” flag (on the top right). You can then put several test cases on multiple lines and check if the ones that should match match and the ones that shouldn’t don’t match.