Check if the letters a or b are exactly 3 positions away from each other.
function ABCheck(str) { return /(a...b|b...a)/gi.test(str); }copy
function ABCheck(str) { return /(a...b|b...a)/gi.test(str); }