Clear
Download
Share
Run Code
// Inspired by
const matchHere = (pattern, text) => { if (pattern.length === 0) return true; // If pattern ends with $, match end of string if (pattern[0] === '