"foo\r\nbar".replace(/(foo).+/m, "bar")

Hello. I can not understand why this code does not replace foo on bar

Edit
Report