JSFiddle - React, Tailwind, and code Playground

by Leonardo Santos

JavaScript

var searchString = 'Ål';
var searchItems = 'Ålborg';

var regexp = new RegExp('^'+ searchString, 'i');
var result = regexp.test(searchItems);

alert(result);