Fixes #390 - Update regexes for :first and :dir()