title: Vim regular expression to match string with prefix and suffix
body: <p>I want to search a string which starts with "abc" and ends with "xyz" in vim.</p>
  
  <p>Below are the commands I've tried:</p>
  
  <pre><code>:1,$g/abc[\w\W]*xyz/
  :1,$g/abc\[\\w\\W\]\*xyz/
  :1,$g/abc*xyz/
  </code></pre>
  
  <p>"[\w\W]*" means the texts between "abc" and "xyz" can be any characters</p>
  
  <p>"1,$" means the search range is from the 1st line to the last line in the file opened by vim.</p>
  
  <p>I found that the search pattern </p>
  
  <pre><code>abc[\w\W]*xyz 
  </code></pre>
  
  <p>works in <a href="https://regex101.com/" rel="noreferrer">https://regex101.com/</a></p>
  
  <p>why does it fail in vim?</p>