Aside from the fact that you can write *every* Perl expression in one line, the regexp in the example posted *was* written in one line.

Honestly, I think this solution is already pretty compact. I understand that regexpes are hard for programming novices, so instead of asking for something simpler, you should study the example and then ask a concrete question, if you don't understand something.