Unix way using grep and sed:
grep -E '(\s[^\s]*){20,}' in.txt | sed 's/^\s*//;s/\s*$//'
The first command filters lines with 20+ whitespaces (even non consecutive), the second command then strips leading and trailing whitespaces.
This isn’t an ideal approach, it’s probably slower then others (awk maybe), but it’s quite simple. By the way, I’d be interested in performance comparison of different methods mentioned on this page…
Yeah, almost everything can be solved with regular expressions! ;)