This answer is somehow different from the first one I posted. Here I attempt to match exactly what is matched on the question.
This is the new live link for this answer: https://regex101.com/r/sr3zjR/3
(?x) # Free spacing mode, to allow comment and better view
# Matching the first line `i5-2520M` (capture group 1)
([^ ]+\s*)(?=CPU\s*@)
# Matching the first line `@ 2.50GHz` (capture group 2)
|(?<=CPU)(\s*@\s*\d+.\d+GHz)
# Matching the `first word` on the second line. (capture group 3)
# The `\s*$` is used to not match empty lines.
|(^[^ ]+)(?!(?:.*CPU\s*@)|\s*$)
# Matching the second line `CPU T2400` (capture group 4)
|(?<=CPU)(\s*[^ ]+\s*)(?=@)
# Matching the second line `1.83GHz` (capture group 5)
|\s*(?<=@)(\s*\d+.\d+GHz)
Here as on the other answer, each capture group hold one of the elements required, therefore you can manipulate each one of them individually by refering to them by their capture group index.
On the group 2, there is the trick where I am matching the @
to allow indefinitely spaces between it and the word before it, due the positive look-behind (?<=)
do not allow the use of the *
operator. You can change the second group expression to this bellow, if it is of interest not match the @
:

# Matching the first line `2.50GHz` (capture group 2)
|(?<=CPU\s@)(\s*\d+.\d+GHz)
This is the new live link for this change: https://regex101.com/r/sr3zjR/5
As on the other places on this answer we are on free spacing mode. Moreover we are required to escape the white-space
with \
or just use the \s
.