TOTAL REVISION from original misunderstanding.
EDIT again to provide two approaches: (1) \IBAN{} for turning an unspaced string of letters into a spaced IBAN number that nonetheless copy/pastes without the spaces, and (2) \ncs{} for taking a space filled string and making it so that a copy/paste removes the spaces.
THE \IBAN{} MACRO APPROACH
Following up on Juri's suggestion, this works. I have edited to automate the process with the syntax, for example, \IBAN{DE12123456789123456789}. The MWE below checks to make sure unusual IBANs, with only a small number of digits, don't break the algorithm.
\documentclass{article}
\usepackage{accsupp}
\def\IBAN#1{%
\unskip\def\viewed{}\IBANhelper#1\relax\relax\relax\relax\relax%
\BeginAccSupp{method=escape,ActualText=#1}%
\viewed%
\EndAccSupp{}%
}
\def\IBANhelper#1#2#3#4#5\relax{\edef\viewed{\viewed\ #1#2#3#4}%
\if\relax#5\relax\else\IBANhelper#5\relax\relax\relax\relax\fi}
\begin{document}
The IBAN number is \IBAN{DE12123456789123456789} if I am not mistaken.
The IBAN number is \IBAN{DE121} if I am not mistaken.
The IBAN number is \IBAN{DE12} if I am not mistaken.
The IBAN number is \IBAN{DE1} if I am not mistaken.
The IBAN number is \IBAN{DE} if I am not mistaken.
The IBAN number is \IBAN{D} if I am not mistaken.
The IBAN number is \IBAN{} if I am not mistaken.
\end{document}
Here is the PDF output:

while the copy/paste output (in Adobe Acrobat) is
The IBAN number is DE12123456789123456789 if I am not mistaken.
The IBAN number is DE121 if I am not mistaken.
The IBAN number is DE12 if I am not mistaken.
The IBAN number is DE1 if I am not mistaken.
The IBAN number is DE if I am not mistaken.
The IBAN number is D if I am not mistaken.
The IBAN number is if I am not mistaken.
I credit this question, Is it possible to provide alternative text to use when copying text from the PDF?, for lernin' me accsupp.
THE \ncs{} (NO-COPY-SPACE) MACRO:
This approach may have more general utility, since it will work for things other than IBAN numbers. In this case, a space-filled string is typeset as is; however, the copy/paste text in the PDF removes all spaces.
\documentclass{article}
\usepackage{accsupp}
\newcommand\ncs[1]{%
\def\actual{}\ncshelper#1 \relax%
\BeginAccSupp{method=escape,ActualText=\actual}%
#1%
\EndAccSupp{}%
}
\def\ncshelper#1 #2\relax{\edef\actual{\actual#1}%
\if\relax#2\relax\else\ncshelper#2\relax\fi}
\begin{document}
I like the palindrome \ncs{a man a plan a canal panama}.
\end{document}
It displays as expected,

but copies/pastes as
I like the palindrome amanaplanacanalpanama .
\allowbreakanddiscretionarywhat you want? – Symbol 1 Aug 29 '14 at 14:57