diff options
| author | Matthieu Pignolet <matthieu@matthieu-dev.xyz> | 2024-06-21 18:03:36 +0400 |
|---|---|---|
| committer | Matthieu Pignolet <matthieu@matthieu-dev.xyz> | 2024-06-21 18:03:36 +0400 |
| commit | 14acfd4476809cc6dc9894c27ac6f03e7972ebc4 (patch) | |
| tree | eb8e39ab94fe4350a5588b640f957667398606f1 | |
| parent | d5b520a1bc9074ea3ca394f27eb90d33e246132b (diff) | |
fix regexes
| -rw-r--r-- | discordjs/src/index.mjs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/discordjs/src/index.mjs b/discordjs/src/index.mjs index 63a5a1e..6021b0c 100644 --- a/discordjs/src/index.mjs +++ b/discordjs/src/index.mjs @@ -32,9 +32,9 @@ const sanitizeWord = (sentence) => { .trim() .split(" ") .slice(-1)[0] - .replaceAll(/(?>\?|\!|\.|\,|\;)/g, "") + .replaceAll(/(\?|\!|\.|\,|\;)/g, "") .replaceAll(/(\s)?([^\x41-\x5A\s^\x61-\x7A^\xC0-\xFF])/g, "") - .replaceAll(/\<(?>[a-z]|[A-Z])+\:(?>[a-z]|[A-Z])+\:[0-9]+\>/g,) + .replaceAll(/\<([a-z]|[A-Z])+\:([a-z]|[A-Z])+\:[0-9]+\>/g, "") .replaceAll(/(?:https?|ftp):\/\/[\n\S]+/g, ''); return lastWord; }; |
