diff options
| author | Tyge Løvset <[email protected]> | 2023-01-03 13:15:22 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-01-03 13:15:22 +0100 |
| commit | 611b45c379af5d690b3a01d1847950411ebce2bd (patch) | |
| tree | c596be5b44d70d3a1a527fb6dc7106952fcebbeb /src | |
| parent | c5abb5b806ddc3eedde2e6bcd31eef78c36edf33 (diff) | |
| download | STC-modified-611b45c379af5d690b3a01d1847950411ebce2bd.tar.gz STC-modified-611b45c379af5d690b3a01d1847950411ebce2bd.zip | |
Minor improvement to word boundaries \b \B.
Diffstat (limited to 'src')
| -rw-r--r-- | src/cregex.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cregex.c b/src/cregex.c index dcfefe24..658d7929 100644 --- a/src/cregex.c +++ b/src/cregex.c @@ -1060,8 +1060,8 @@ _regexec1(const _Reprog *progp, /* program to run */ case TOK_NWBOUND: ok = true; case TOK_WBOUND: /* fallthrough */ - if (ok ^ (s == bol || s == j->eol || ((utf8_isalnum(utf8_peek_off(s, -1)) || s[-1] == '_') - ^ (utf8_isalnum(utf8_peek(s)) || s[0] == '_')))) + if (ok ^ (s == bol || s == j->eol || (utf8_isword(utf8_peek_off(s, -1)) + ^ utf8_isword(utf8_peek(s))))) continue; break; case TOK_NCCLASS: |
