/^(?<!#.+)\r$/gs
/^(?!#).+$/gs
^(?!#.+)$\r
I have the following RegEx: ^(?!#)(?<=.+)$\r (with the global and multiline flags set) What I want to do is match a newline only when it ends a line that doesn't start with '#'.
jQuery.map()