in reply to Contents of $2 empty

Just one more little thing. You're not really interested in capturing the 'a' so you could change your regexp into
/(?:a\b)(.{0,5})/ /(?<=a\b)(.{0,5})/

Cheers
LuCa