For example:
let myString = "Hello World"
let myMatch = myString.match(/H.*/)
console.log(myMatch)
Or
let myString = "Hello World"
let myVariable = "H"
let myReg = new RegExp(myVariable + ".*")
let myMatch = myString.match(myReg)
console.log(myMatch)