apparently multiline flag "m" not properly supported in javascript - use [\s\S] instead