title: Regex pattern in Javascript
body: <p>I want to match a string pattern which has first 4 characters, then the "|" symbol, then 4 characters, then the "|" symbol again and then a minimum of 7 characters.</p>
  
  <p>For example, <code>"test|test|test123"</code> should be matched.</p>
  
  <p>I tried <code>RegExp("^([a-za-z0-9-|](4)[a-za-z0-9-|](5)[a-za-z0-9-|](3)+)$")</code> for this, but it didn't match my test case.</p>
  
  <p><strong>test|test|test1234</strong></p>