Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I should match. the number 15 there means that repeat x up to 15 times. so 1+15=16.

looks good to me



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.


where does the extra 1 come from? a{2,5} means match 'a' two to five times




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: