regex get char based on following char code example Example: regex char or char //check if have "i" or "o" /i|o/.test(var)