Js glob à regex

// Rudimentary code for matching globs with ? and *
// Escape the dots, change * to .* and ? to . 
// and make it match entire string
new RegExp
(
  '^' +
  rx.replaceAll('\.', '\\.')
  .replaceAll('*', '.*')
  .replaceAll('?', '.') +
  '$'
)
Magnificent Mockingbird