handlebars/helpers/index.js
function regex (strings, ...args) {
  return String.raw(strings, ...args.map(_.escapeRegExp))
}
function regex (strings, ...args) {
  return String.raw(strings, ...args.map(_.escapeRegExp))
}
function regex ( strings , ... args ) { return String . raw ( strings , ... args . map ( _ . escapeRegExp ) ) }
Helper function for composing template-literals to properly escaped regexes
@param strings
@param args
@returns {string}
@access private
Helper function for composing template - literals to properly escaped regexes