var str = "Sorry, ///it is/// in my coat."
var str1 = "Sorry, <b><em>it is</em></b> <input type="text" id="сформированныйУникальныйID"> in my coat."
str.replace(
/\/\/\/(.+)\/\/\//,
(_, match) => `<b><em>${match}</em></b> <input type="text" id="${Math.random()}">`
)