With JavaScript regular expression replace, trying to replace anything between <head> and </head> tags so that:
<head>
Multiline foo
</head>
<body>
Multi line bar
</body>
gets replaced into:
<body>
Multi line bar
</body>
and trying with the very basic: <head(.*)\/head>/m which doesn't work. It works fine when line breaks are removed from string. No matter what type of line breaks, what's the magic?