Javascript's regex syntax only has one word boundary: \b
.
Vim's regex syntax has two: \<
(start of word) and \>
(end of word).
Can anyone give me an example of a search that can be achieved with the vim style word boundaries but could not be achieved with the javascript style?
Or is it the case that regex syntaxes that have a single word boundary can do just as much but there is some other advantage to having start and end boundaries?
\<
would be written in javascript as\b(?=\w)
, there's no case where you could not achieve a match. It's just the way it's defined. – Svoboda