You open a log in less, start reading, and wish you had piped it through grep first. You can filter without leaving the pager.
Inside less, type &, then a pattern, then Enter:
less /var/log/nginx/error.log
&timeout
Now only lines that match timeout are shown. The prompt starts with an ampersand as a reminder that lines are hidden. The pattern is a regular expression, so &error|warn keeps both kinds.
Filters stack. Type & with a second pattern and you see only lines that match both, which is handy to narrow a big log step by step. To show everything again, type & and press Enter with nothing after it.
One variation I like: &! followed by a pattern shows the lines that do not match, great for hiding noisy health checks.
&!GET /health
Very old versions of less don’t have the command, and some minimal containers ship BusyBox less, which lacks it too. If & just beeps, check less --version. Searching with / still works everywhere.
Further reading: less(1) Linux manual page