summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-14 15:00:52 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-14 15:00:52 +0200
commit77cc4d4fdbbf380a1fd066d6282bb35caed9088f (patch)
treeb8372413dfcca69f2fa963de4edc7e3ac9c1d38b /src/util
parent:bug: fix message model (diff)
downloadserver-77cc4d4fdbbf380a1fd066d6282bb35caed9088f.tar.xz
:zap: export regex
Diffstat (limited to 'src/util')
-rw-r--r--src/util/Regex.ts3
-rw-r--r--src/util/String.ts3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/util/Regex.ts b/src/util/Regex.ts
new file mode 100644
index 00000000..bbd48bca
--- /dev/null
+++ b/src/util/Regex.ts
@@ -0,0 +1,3 @@
+export const DOUBLE_WHITE_SPACE = /\s\s+/g;
+export const SPECIAL_CHAR = /[@#`:\r\n\t\f\v\p{C}]/gu;
+export const CHANNEL_MENTION = /<#(\d+)>/g;
diff --git a/src/util/String.ts b/src/util/String.ts
index afbfc1e6..407b669d 100644
--- a/src/util/String.ts
+++ b/src/util/String.ts
@@ -1,5 +1,4 @@
-export const DOUBLE_WHITE_SPACE = /\s\s+/g;
-export const SPECIAL_CHAR = /[@#`:\r\n\t\f\v\p{C}]/gu;
+import { DOUBLE_WHITE_SPACE, SPECIAL_CHAR } from "./Regex";
 
 export function trimSpecial(str: string) {
 	return str.replace(SPECIAL_CHAR, "").replace(DOUBLE_WHITE_SPACE, " ").trim();