I went user story by user story and now my code fulfills all but one user stories. My regex does not match “Z97” because {2,} requires at least 2 letters at the beginning, but if I change it to the quantifier + instead, 2 other user stories are not being fulfilled anymore… I am trying to figure this out since hours and I am not sure if my code is a dead end… Can anybody give me a hint?
Thank you so much! I was able to match Z97 now with the following regex:
/(^[a-zA-Z])([a-zA-Z]|[0-9]{2,}$)/
Unfortunately, the regex matches BadUs3rnam3 now, because the first a of BadUs3rnam3 is matched with the first option of the second capturing group and I feel like I am back to where I was yesterday
I am determined to figure this out soon!