Start at the beginning of the string. Match the character 'a' literaly. Match one of the characters 'p' or 'd'. Match a "word" character between zero and unlimited times, as many times as possible. For what falls under "word" characters see Word character: \w