title: Knockout validation - to match starts with specific characters
body: <p>I have to validate if an ID starts with a specific set of characters, followed by alphanumeric values. I am using knockout validation. </p>
  
  <p>I have the code here, </p>
  
  <pre><code>var value_id = ko.observable('').extend({
              minLength: 18,
              maxLength: 18,
              pattern: {
                params: '/^(xyz34|xyz12)((?=.*[a-zA-Z])(?=.*[0-9])){13}/g',
                message: 'Please provide a valid ID.'
              },
              required: {
                message: 'Please enter a ID.',
                params: true
              }
            });
  </code></pre>
  
  <p>The same pattern is working fine in online regex tester.</p>
  
  <p>Any suggestion would be helpful.</p>