Added options to chose sorting mode of regular expression
Fixed forward projection test (probably an erroneous commit of Julien)