From 6d3f47019ad7d41cc2bdc63c831aaece2b0a3c34 Mon Sep 17 00:00:00 2001 From: SMAZNet Date: Sun, 31 Jan 2021 08:33:25 +0330 Subject: [PATCH] this should fix #356 this fixes #356 --- src/brain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/brain.js b/src/brain.js index 9e29ad1..815827b 100644 --- a/src/brain.js +++ b/src/brain.js @@ -592,7 +592,7 @@ class Brain { // So then we switch it back down here. Also, we don't just use \w+ because // that matches digits, and similarly [A-Za-z] doesn't work with Unicode, // so this regexp excludes spaces and digits instead of including letters. - regexp = regexp.replace(/\\w/, "[^\\s\\d]"); + regexp = regexp.replace(/\\w/g, "[^\\s\\d]"); // Filter in arrays. giveup = 0;