in reply to help with regular exprestion

Check out lookahead patterns (?=...), in your case you would probably need m/(\w+)(?=\s+roy)/g