Fixed regular expression to correctly handle new lines