in reply to match the name

You were rather unclear. Perhaps you want
/(?<![a-z])AP(?![a-z])/i
Or maybe
/(?<!\S)AP(?!\S)/i