title: Easiest way to test vim regex?
body: <p>I'm trying to write a vim syntax file, one problem I'm dealing with is vim's regex syntax is different from most other languages(I think the one called "perl compatible regex", Python, JavaScript etc. uses mostly the same regex syntax) and so I can't use regex testers like regexpal. </p>
  
  <p>What is the easiest way to try vim regexes ? Ideally what I want is two splits, in one I'll write vim regex, and the other one will have the text, and matched parts should be highlighted.</p>
  
  <p>Thanks in advance.</p>
  
  <p>EDIT: I added a modified version of Ingo Karkat's answer to my <code>.vimrc</code>:</p>
  
  <pre><code>nnoremap &lt;F5&gt; mryi":let @/ = @"&lt;CR&gt;`r
  </code></pre>
  
  <p>This version also puts cursor back where it was when pressed F5 with the cost of losing mark <code>r</code>.</p>