Regular Expressions: Restrict Possible Usernames - Question on solution


Apologies if this has already been answered somewhere, I couldn’t find it. In the solutions to the Regular Expressions: Restrict Possible Usernames exercise there is a mixture of long hand and short hand used (eg [0-9] and \d are both used in the solution). As I understand it they are interchangeable so wouldn’t it make more sense/be easier to read if one was used throughout? Or is there a reason to sometimes use one and sometimes the other?


i-think-they-set-it-up-for-us-so-we-can -practise-and-learn -them-both-fcc-is-made-for-us-to-learn-code

Solutions have been added by different contributors over the years, which causes some variations. In this case the original contributor of the solutions might have included this mix, or someone else may have updated the solutions when the challenge requirements changed. The Guide solutions are always just one of many possible ways to solve the problem.