application/models/bestitamazonpay4oxidaddressutil.php
protected function _parseSingleAddress($sString, $sIsoCountryCode = null)
    {
        // Array of iso2 codes of countries that have address format <street_no> <street>
        $aStreetNoStreetCountries = $this->getConfig()->getConfigParam('aAmazonStreetNoStreetCountries');

        if (in_array($sIsoCountryCode, $aStreetNoStreetCountries)) {
            // matches streetname/streetnumber like "streetnumber streetname"
            preg_match('/\s*(?P<Number>\d[^\s]*)*\s*(?P<Name>[^\d]*[^\d\s])\s*(?P<AddInfo>.*)/', $sString, $aResult);
        } else {
            // default: matches streetname/streetnumber like "streetname streetnumber"
            preg_match('/\s*(?P<Name>[^\d]*[^\d\s])\s*((?P<Number>\d[^\s]*)\s*(?P<AddInfo>.*))*/', $sString, $aResult);
        }

        return $aResult;
    }
protected function _parseSingleAddress($sString, $sIsoCountryCode = null)
    {
        // Array of iso2 codes of countries that have address format <street_no> <street>
        $aStreetNoStreetCountries = $this->getConfig()->getConfigParam('aAmazonStreetNoStreetCountries');

        if (in_array($sIsoCountryCode, $aStreetNoStreetCountries)) {
            // matches streetname/streetnumber like "streetnumber streetname"
            preg_match('/\s*(?P<Number>\d[^\s]*)*\s*(?P<Name>[^\d]*[^\d\s])\s*(?P<AddInfo>.*)/', $sString, $aResult);
        } else {
            // default: matches streetname/streetnumber like "streetname streetnumber"
            preg_match('/\s*(?P<Name>[^\d]*[^\d\s])\s*((?P<Number>\d[^\s]*)\s*(?P<AddInfo>.*))*/', $sString, $aResult);
        }

        return $aResult;
    }
protected function _parseSingleAddress ( $ sString , $ sIsoCountryCode = null ) { // Array of iso2 codes of countries that have address format <street_no> <street> $ aStreetNoStreetCountries = $ this -> getConfig ( ) -> getConfigParam ( 'aAmazonStreetNoStreetCountries' ) ; if ( in_array ( $ sIsoCountryCode , $ aStreetNoStreetCountries ) ) { // matches streetname/streetnumber like "streetnumber streetname" preg_match ( '/\s*(?P<Number>\d[^\s]*)*\s*(?P<Name>[^\d]*[^\d\s])\s*(?P<AddInfo>.*)/' , $ sString , $ aResult ) ; } else { // default: matches streetname/streetnumber like "streetname streetnumber" preg_match ( '/\s*(?P<Name>[^\d]*[^\d\s])\s*((?P<Number>\d[^\s]*)\s*(?P<AddInfo>.*))*/' , $ sString , $ aResult ) ; } return $ aResult ; }
Returns parsed Street name and Street number in array

@param string $sString Full address
@param string $sIsoCountryCode ISO2 code of country of address

@return string
Returns parsed Street name and Street number in array