JavaScript
Insensitive match words

by Benny Neugebauer

const expected = 'Benny';
const input = 'BEnNy';

const isMatched = expected.toLowerCase() === input.toLowerCase();

const expected = 'Benny';
const input = 'BEnNy';

const isMatched = new Boolean(expected.match(new RegExp(`^${expected}$`, 'i')));