HOW TO USE NEW LINE IN REGEX OF JAVASCRIPT code example
Example: javascript regex match any character including newline
//([\s\S]*?) matches any character including newline
var result = str.match(/<script>([\s\S]*?)<\/script>/g)
//([\s\S]*?) matches any character including newline
var result = str.match(/<script>([\s\S]*?)<\/script>/g)