Judge strikes law citing 'terrorist' groups