Report question

Question: How to match word surronded by spaces OR at the end / beginning of the string using Perl regexp?