0

I need to regain regular expression search pattern while using less command. Is there any way to do that?. Once I start searching the expression disappears.

migrated from serverfault.com May 24 '15 at 1:50

This question came from our site for system and network administrators.

  • What do you mean by "regain the regular expression pattern"? – Janis May 24 '15 at 2:16
1

When searching in less, matches are highlighted, then you can use n (or N) to search for the next (resp. previous) pattern, and if typing / (to initiate a new search) but using the up/down arrow-keys you can get (inspect and modify) the previous entered regular expression.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.