- $sNormPostcode = $this->normalizeString($aWord['word']);
- if (strpos($sNormQuery, $sNormPostcode) !== false) {
- $oValidTokens->addToken(
- $sTok,
- new Token\Postcode($iId, $aWord['word'], null)
- );
+ $iSplitPos = strpos($aWord['word'], '@');
+ if ($iSplitPos === false) {
+ $sPostcode = $aWord['word'];
+ } else {
+ $sPostcode = substr($aWord['word'], 0, $iSplitPos);