⚡ export regex
This commit is contained in:
parent
532124e732
commit
77cc4d4fdb
3
src/util/Regex.ts
Normal file
3
src/util/Regex.ts
Normal file
@ -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;
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user