JSFiddle - React, Tailwind, and code Playground

by shapeshifta

JavaScript

var matcher = /^lei$/i;
var str1 = 'Leipzig';
var str2 = '<i class="icons icon-path"></i><b>Leip</b>zig, Germany (163 Hotels)';

console.log(matcher.test(str1));
console.log(matcher.test(str));