?PATTERN
?
This is just like the
/
PATTERN
/
search, except that it matches only once between
calls to reset, so
it finds only the first occurrence of something rather than all occurrences.
(In other words, the operator works repeatedly until it actually matches
something, then it turns itself off until you explicitly turn it back
on with reset.)
This may be useful (and efficient) if you want to see only the first
occurrence of the pattern in each file of a set of files. Note that
m??
is equivalent to ??
.
The reset operator will only reset
instances of ??
that were compiled in
the same package that it was.