Given street:
D/5 The Esplanade
(Full Address: D/5 The Esplanade, Eastern Beach, Auckland 2012)
Current result:
array ( 'additionToAddress1' => '', 'streetName' => 'D/', 'houseNumber' => '5', 'houseNumberParts' => array ( 'base' => '5', 'extension' => '', ), 'additionToAddress2' => 'The Promenade', )
Expected result:
array ( 'additionToAddress1' => 'D/', 'streetName' => 'The Promenade', 'houseNumber' => '5', 'houseNumberParts' => array ( 'base' => '5', 'extension' => '', ), 'additionToAddress2' => '', )
The comma in the following line is breaking the expected result:
(?:(?P<A_Addition_to_address_1>.*?),\s*)? # Addition to address 1
Given street:
D/5 The Esplanade
(Full Address: D/5 The Esplanade, Eastern Beach, Auckland 2012)
Current result:
array ( 'additionToAddress1' => '', 'streetName' => 'D/', 'houseNumber' => '5', 'houseNumberParts' => array ( 'base' => '5', 'extension' => '', ), 'additionToAddress2' => 'The Promenade', )Expected result:
array ( 'additionToAddress1' => 'D/', 'streetName' => 'The Promenade', 'houseNumber' => '5', 'houseNumberParts' => array ( 'base' => '5', 'extension' => '', ), 'additionToAddress2' => '', )The comma in the following line is breaking the expected result:
(?:(?P<A_Addition_to_address_1>.*?),\s*)? # Addition to address 1