implement regular expression lookahead