Back to front pageView on Hacker News (opens in a new tab)Show HN: Regex Cheatsheet (opens in a new tab)ihateregex.io499 pointsby geongeorgek (on Hacker News)6 years agoihateregex.io (opens in a new tab)iHateRegex — Understand, test, and share regexA modern regular expression playground with live matching, visual railroad diagrams, rich notes, and easy sharing.Comments (129) 40 threadsShow all commentsShowing thread 27 of 40[-]Amarok6 years ago1 reply#^[a-z0-9_-]{3,15}$The username reference doesn't match 16 characters as claimed[-]geongeorgek6 years ago2 replies#I should match. the number 15 there means that repeat x up to 15 times. so 1+15=16.looks good to measicsp6 years ago#where does the extra 1 come from? a{2,5} means match 'a' two to five timesaratauto6 years ago#That is not correct. 15 is total maximum number of repeats including the first one. Even the diagram on https://ihateregex.io/expr/username correctly says that loop can be taken between 2 and 14 times.
Show HN: Regex Cheatsheet (opens in a new tab)ihateregex.io499 pointsby geongeorgek (on Hacker News)6 years ago
Amarok6 years ago1 reply#^[a-z0-9_-]{3,15}$The username reference doesn't match 16 characters as claimed
geongeorgek6 years ago2 replies#I should match. the number 15 there means that repeat x up to 15 times. so 1+15=16.looks good to me
aratauto6 years ago#That is not correct. 15 is total maximum number of repeats including the first one. Even the diagram on https://ihateregex.io/expr/username correctly says that loop can be taken between 2 and 14 times.
Comments (129) 40 threads
Show all comments
Showing thread 27 of 40
The username reference doesn't match 16 characters as claimed
looks good to me