Q:

Regex: how to extract text until end of string with multiple new lines?

I want it to match each of the text and flexible enough to read multiple lines instead of a single line.
Text single input example
383 Bukit Timah Road #01-09B Alocassia Apartments Singapore 259727

Text with multiple lines example
383 Bukit Timah Road 
#01-09B Alocassia Apartments 
Singapore 259727

448 Ang Mo Kio 
Avenue 10 #01-1693 
Singapore 560448

383 Bukit Timah Road 
#01-09B Alocassia Apartments 
Singapore 259727

Regex:
(\d+ .*\d{6}\b)

A:

Use [^] (specific to JavaScript Regex) to match any character including linebreaks
The regex is:
^(\d+ [^]*?\b\d{6})$

Demo & explanation

var test = [
`383 Bukit Timah Road #01-09B Alocassia Apartments Singapore 259727`,
`383 Bukit Timah Road 
#01-09B Alocassia Apartments 
Singapore 259727`,
`448 Ang Mo Kio 
Avenue 10 #01-1693 
Singapore 560448`,
`383 Bukit Timah Road 
#01-09B Alocassia Apartments 
Singapore 259727`,
`123 blah blah`,
`blah blah 123456`,
`123 blah blah 1234567`
];
console.log(test.map(function (a) {
  return a + ' :' + /^(\d+ [^]*?\b\d{6})$/.test(a);
}));

