(?!\.php) is a perl regexp operator.
less generally uses the system's POSIX regexp API, so typically GNU extended regular expressions on a GNU system,
vim regular expressions.
vim, as already shown by Gnouc, the equivalent of
index(?!\.php) would be
less, at compile time, you can choose the regex library/API and as a result the regex type to use:
Select a regular expression library auto
By default though,
less will use POSIX
regcomp with REG_EXTENDED, so you'll get the extended regular expressions of your system, so typically something similar as with
In GNU extended regexp, there's no equivalent look behind or look ahead operator.
You could do it the hard way:
less, you could possibly use the
& key to filter out the lines containing
&!index\.php), and then search for
/index). (you'd still miss the other instances of
index that appear on a line also containing