From 9c05f880b00065abfa6f8c9335a50522b76a4fa2 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 30 Jul 2021 20:23:18 -0700 Subject: Added | as alias for \b --- pattern.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pattern.c') diff --git a/pattern.c b/pattern.c index 861efdf..785b45a 100644 --- a/pattern.c +++ b/pattern.c @@ -332,6 +332,10 @@ static pat_t *_bp_simplepattern(file_t *f, const char *str) return all; } + // Word boundary + case '|': { + return new_pat(f, start, str, 0, 0, BP_WORD_BOUNDARY); + } // String literal case '"': case '\'': case '\002': { char endquote = c == '\002' ? '\003' : c; -- cgit v1.2.3