Skip to content

regexp: document that in *All if n < 0 means return all matches #24526

@odeke-em

Description

@odeke-em

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.

screen shot 2018-03-25 at 2 45 03 pm

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions