Try using a regular expression. You can get help with, and test your own regular expressions using a site like http://www.regexr.com/

Code:
on $*:text:/your\s(a|an)\s/i:#: {
  msg # success!
}