> So I tried searching for a line that starts with 5 digits and ends with any
> letter like this:

    ^[0-9][0-9][0-9][0-9][0-9][A-Z]$

That pattern matches lines that contain *only* 5 digits and a (capital) letter.  If you expect there to be more between them, you will need to include it in the pattern.  If you don't care what goes between them, use <code>.*</code> to match any character, unlimited times.  You should probably also include lower-case letters, or use <code>grep -i</code> to ignore case.

    ^[0-9]\{5\}.*[A-Za-z]$

> My next best try would be searching for the name and the first name by
> searching for a line which contains only two words. But I don't know how to
> do that and I can't find any discussion in which this is explained.

You could match lines that contain two simple words, with a pattern that runs: start, word, gap, word, end:

    ^[[:alpha:]]\+[[:space:]]\+[[:alpha:]]\+$

However, attempting to match a name with a regular expression has many pitfalls.  See https://stackoverflow.com/questions/2385701/regular-expression-for-first-and-last-name .