From ba6ee18ded5e76e852dd7eab89e6cc2b420b42d2 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 30 Jul 2021 19:24:35 -0700 Subject: Added strict mode for upto operator: ..=Abc --- bp.1.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bp.1.md') diff --git a/bp.1.md b/bp.1.md index 60a51a9..1e02264 100644 --- a/bp.1.md +++ b/bp.1.md @@ -207,6 +207,13 @@ etc.) of *skip* (e.g. `'"' ..%('\' .) '"'` opening quote, up to closing quote, skipping over backslash followed by a single character) +`.. =` *only* *pat* +: Any number of repetitions of the pattern *only* up to and including *pat* +(e.g. `"f" ..=abc "k"` matches the letter "f" followed by some alphabetic +characters and then a "k", which would match "fork", but not "free kit") This +is essentially a "non-greedy" version of `*`, and `.. pat` can be thought of as +the special case of `..=. pat` + `<` *pat* : Matches at the current position if *pat* matches immediately before the current position (lookbehind). Conceptually, you can think of this as creating -- cgit v1.2.3