removes '?' and adds '$' to regexp patterns (addresses points 4,5 of issue #19)