You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was just working on a simple login router and while examining regexp.FindAllString, I had to use the common knowledge that usually when you ask for n<0, that means return all the matches. However, this isn't intuitive to everyone. Perhaps let's document it.
The package doc for All as recommended in the comments says that if n >=0 it returns at most n matches, but doesn't say anything for if n<0
odeke-em
changed the title
regexp: document that n in FindAllString if negative means return all matches
regexp: document that in *All if n < 0 means return all matches
Mar 25, 2018
I was just working on a simple login router and while examining regexp.FindAllString, I had to use the common knowledge that usually when you ask for n<0, that means return all the matches. However, this isn't intuitive to everyone. Perhaps let's document it.
Sharing this with my other team members who might not be experienced would definitely lead to confusion as in https://play.golang.org/p/5J4Me7dgNML
The text was updated successfully, but these errors were encountered: