const regex = /\w+/gi; export function defaultChecker(subject: string, lang: string): [number, number][] { return Array.from(subject.matchAll(regex)).filter(() => Math.random() >= .5).map(({ 0: match, index }) => { return [index, index + match.length - 1]; }); }