javascript regex single line

JavaScript
//s Flag 
// replace . with [\s\S] ad ex.

/<!--(.*?)-->/gs ->>>>> /<!--([\s\S]*?)-->/g

//or

/<!--(.*?)-->/gs ->>>>> /<!--[\s\S]([\s\S]*?)[\s\S]-->/g

Source

Also in JavaScript: