Did you find translate() ? You should be able to use this to remove whitespace, then do your 15-digit check on what's left. Specifically:
...If fromchars is longer than tochars then every occurrence of a character in fromchars that does not have a corresponding character in tochars will be removed.
Alternatively, you might be able to do it all in just the regex, eg
hmm... the client XPath regex processor might not recognize '\s' as whitespace. You might try this instead if that is the case (\t = tab, \r = CR, \n = newline):