You don't need to put space in a character class, and you can do a case insensitive search rather than spell out every combination of 'the',  Also, you should anchor the match to the beginning of the string '^' as it will be faster e.g.:

  preg_match( '/^(.+), *(the)$/i', $title, $matches )