Grabbing resolution and offset from xrandr
Cleaner is very much in the eye of the beholder.
Your regex is fine - although for the digits part - I would use \d+ because you expect at least 1 digit.  And \&lt; only works in GNU sed (not on OSX for instance).
Alternative you can look at it differently .. e.g only print the lines you care about, and on those lines drop everything you don't care about).
sed -n -e '/connected/ { s/ (.*$//; s/^.*ected //; s/^primary //; p; }'