summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/cregex.c4
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: