regular expression search within command less

3

Exactly what kind of regular expression search is supported by less (e.g. can I use \d+)?

man less isn't clear on that, and my primarily google on that didn't return much good hit either. Thx.

xpt

Posted 2017-03-30T02:19:48.963

Reputation: 5 548

Answers

4

Less uses the regular expression library which is compiled with your system.

Sometimes you can find out which version it is by using the --version option:

less --version

The first row may tell you what it was compiled with, for example:

less 481 (PCRE regular expressions)
Copyright (C) 1984-2015  Mark Nudelman

less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Homepage: http://www.greenwoodsoftware.com/less

More about the subject here: https://stackoverflow.com/questions/14698364/what-is-the-regular-expression-library-supplied-by-my-system

DocWeird

Posted 2017-03-30T02:19:48.963

Reputation: 1 201