getactivetests - detect optionals and non-greedy