Updated regex parameters to also match new lines