Make nextpattern and previouspattern match more patterns.