var ss= \"aaaa\\nbbb\\ncccffffd\"; var arr= ss.match( //gm ); alert(arr); // null
aaaa\\nbbb\\nccc
I\'d want the PR
[.\n] doesn't work, because dot in [] (by regex definition; not javascript only) means the dot-character. You can use (.|\n) (or (.|[\n\r])) instead.
[.\n]
[]
(.|\n)
(.|[\n\r])