I wrote a regex to fetch string from HTML, but it seems the multiline flag doesn\'t work.
This is my pattern and I want to get the text in h1 tag.
h1
The dotall modifier has actually made it into JavaScript in June 2018, that is ECMAScript 2018. https://github.com/tc39/proposal-regexp-dotall-flag
const re = /foo.bar/s; // Or, `const re = new RegExp('foo.bar', 's');`. re.test('foo\nbar'); // → true re.dotAll // → true re.flags // → 's'