• Russ Cox's avatar
    regexp: reword Match documentation to be more like Find · f50448f5
    Russ Cox authored
    Before:
    
      // Find returns a slice holding the text of the leftmost match in b of the regular expression.
    
      // Match checks whether a textual regular expression matches a byte slice.
    
    After:
    
      // Match reports whether the byte slice b contains any match of the regular expression re.
    
    The use of different wording for Find and Match always makes me think
    that Match required the entire string to match while Find clearly allows
    a substring to match.
    
    This CL makes the Match wording correspond more closely to Find,
    to try to avoid that confusion.
    
    Change-Id: I97fb82d5080d3246ee5cf52abf28d2a2296a5039
    Reviewed-on: https://go-review.googlesource.com/123736
    Run-TryBot: Russ Cox <rsc@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    f50448f5
regexp.go 35.1 KB