From 8ae7116237ef9cd8b92964a7c73bb8bfde35abdd Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Wed, 16 Mar 2016 14:29:43 +0200 Subject: [PATCH] Document storing of submatches in a selection's regex --- doc/manpages/registers.asciidoc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/manpages/registers.asciidoc b/doc/manpages/registers.asciidoc index 5afb7cd7..d3ef8085 100644 --- a/doc/manpages/registers.asciidoc +++ b/doc/manpages/registers.asciidoc @@ -55,3 +55,15 @@ contain some special data *#*:: selection indices (first selection has 1, second has 2, ...) + +Integer registers +----------------- +Registers *1* to *9* hold the grouped sub-matches of the regular +expression used to make the last selection. Example: applying the +following regular expression to the date of the day would put the day of +the week in register *1*, the month in register *2*, and the day of the +month in register *3*, but select the entire date: + +-------------------- +(\w+) (\w+) (\d+) .+ +--------------------