From 98dfb2dc8ea8c42483906b8ed5555f16c55ca369 Mon Sep 17 00:00:00 2001 From: Kate F Date: Wed, 23 Oct 2024 11:15:01 +0100 Subject: [PATCH 1/2] Missing documentation for -x --- man/rx.1/rx.1.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/man/rx.1/rx.1.xml b/man/rx.1/rx.1.xml index a9f1ffd18..27d358177 100644 --- a/man/rx.1/rx.1.xml +++ b/man/rx.1/rx.1.xml @@ -44,6 +44,7 @@ -v"> -w"> -X"> + -x"> -h"> ]> @@ -462,6 +463,17 @@ + + &x.opt; + + + Literals are unanchored. + This applies to all literals; for finer control use a regex dialect. + The default is that literals are anchored, + as if written ^abc$ in regex syntax. + + + &h.opt; From 280ca7c30da78b12925a67531dea3be48ed4fc3c Mon Sep 17 00:00:00 2001 From: Kate F Date: Wed, 23 Oct 2024 11:19:45 +0100 Subject: [PATCH 2/2] Too much documentation for -u. --- man/rx.1/rx.1.xml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/man/rx.1/rx.1.xml b/man/rx.1/rx.1.xml index 27d358177..01956b47a 100644 --- a/man/rx.1/rx.1.xml +++ b/man/rx.1/rx.1.xml @@ -404,29 +404,20 @@ &u.opt; - Allow ambiguities. - This means patterns with different ids may match the same text. - The default is to error for conflicts. + Allow ambiguities between patterns. + This means patterns with different ids may match the same text. - It's possible to have multiple patterns with the same id - (i.e. by being in the same file when using multi-file mode), - and these are not considered a conflict because they key - to the same id. - - - - - &u.opt; - - - Allow ambiguities between regexps, - such that multiple regexps may match the same text. - The default is to error for ambiguities, + The default is to error for ambiguities, requiring all regexps unioned to be non-overlapping. Formally, the requirement is that they are disjoint languages. Erroring for ambiguities applies after multiple regexps are joined, either by union or by concatenation (&s.opt;). + It's possible to have multiple patterns with the same id + (i.e. by being in the same file when using multi-file mode), + and these are not considered a conflict because they key + to the same id. + &u.opt; is implied by &n.opt;.