I want to search a string which starts with "abc" and ends with "xyz" in vim.
Below are the commands I've tried:
:1,$g/abc[\w\W]*xyz/
:1,$g/abc\[\\w\\W\]\*xyz/
:1,$g/abc*xyz/
"[\w\W]*" means the texts between "abc" and "xyz" can be any characters
"1,$" means the search range is from the 1st line to the last line in the file opened by vim.
I found that the search pattern
abc[\w\W]*xyz
works in https://regex101.com/
why does it fail in vim?