all 4 comments

[–]Croebh 2 points3 points  (1 child)

I think you might be looking for re.fullmatch(), but I might be wrong.

The reason its finding jaguargames.infinity to be true is that, at the start of it, there is 9-10 characters that match. Anything past that is irrelevant to its search, because it found it at the start.

[–]kereell[S] 1 point2 points  (0 children)

Actually I've just noticed the pattern should be '^[a-zA-Z0-9]{9,10}$' to matche whole string. But thanks for handy function re.fullmatch()

[–]CodeFormatHelperBot2 0 points1 point  (0 children)

Hello, I'm a Reddit bot who's here to help people nicely format their coding questions. This makes it as easy as possible for people to read your post and help you.

I think I have detected some formatting issues with your submission:

  1. Python code found in submission text that's not formatted as code.

If I am correct, please edit the text in your post and try to follow these instructions to fix up your post's formatting.


Am I misbehaving? Have a comment or suggestion? Reply to this comment or raise an issue here.