Is there a shortcut for word boundary in `less`?

后端 未结 4 821
情书的邮戳
情书的邮戳 2021-01-11 12:22

This is the less I am using:

less 458 (POSIX regular expressions)
Copyright (C) 1984-2012 Mark Nudelman

In Vim it is \\< a

4条回答
  •  日久生厌
    2021-01-11 13:17

    First see if man 7 re_format on your computer has an "Enhanced features" section which lists \< etc. If it does, change one line in less-451/pattern.h:

    #define REGCOMP_FLAG  REG_ENHANCED  // not REG_EXTENDED
    

    Then ./configure --with-regex=posix; make less will understand \< .

    This works on Macosx 10.8; on other systems, try following /usr/include/regex.h .
    (Gnu.org has a round dozen Regular-expression-syntaxes ?! )

提交回复
热议问题