Toggle regular expression matching and re-run search if there's an active query. See isInvalidPattern.