a new regular expression engine for solving both positive and negative membership constraints