Clarify docstring in Str module

master
Eugen Zalinescu 2020-10-21 21:36:21 +02:00
parent 10364b67d5
commit d0c0c96d19
1 changed files with 2 additions and 1 deletions

View File

@ -156,7 +156,8 @@ val matched_group : int -> string -> string
(** [matched_group n s] returns the substring of [s] that was matched
by the [n]th group [\(...\)] of the regular expression that was
matched by the last call to a matching or searching function (see
{!Str.matched_string} for details).
{!Str.matched_string} for details). When [n] is [0], it returns the
substring matched by the whole regular expression.
The user must make sure that the parameter [s] is the same string
that was passed to the matching or searching function.
@raise Not_found if the [n]th group