public static Address getEhcAddress(Anschrift elexisAddress) { String elexisStreet = elexisAddress.getStrasse(); String houseNumber = ""; // try to get the house number Matcher matcher = lastIntPattern.matcher(elexisStreet); if (matcher.find()) { houseNumber = matcher.group(1); elexisStreet = elexisStreet.substring(0, matcher.start(1)); } Address ehcAddress = new Address( elexisStreet.trim(), houseNumber, elexisAddress.getPlz(), elexisAddress.getOrt()); ehcAddress.setAddressline1(elexisAddress.getStrasse()); return ehcAddress; }