title: Regex SRV-record
body: <p>I'm trying to validate a string to a regex (SRV-record)</p>
  <p>When i test my RegEx on <a href="https://regex101.com/" rel="nofollow noreferrer">https://regex101.com/</a> it works without any problems:</p>
  <p>&quot;(?=^.{4,253}$)(([0-9]{1,10}[\s]{1,1}[0-9]{1,10}[\s]{1,1}((?!-)[a-zA-Z0-9-_^\s]{1,63}(?&lt;!-)[.^\s]{0,1})+[a-zA-Z^\s]{2,63}[.^\s]{0,1}(?&lt;![\s]))$)&quot;gm</p>
  <p>If i use this RegEx on my website it failed:</p>
  <p>var pattern = new RegExp('(?=^.{4,253}$)(([0-9]{1,10}[\s]{1,1}[0-9]{1,10}[\s]{1,1}((?!-)[a-zA-Z0-9-_^\s]{1,63}(?&lt;!-)[.^\s]{0,1})+[a-zA-Z^\s]{2,63}[.^\s]{0,1}(?&lt;![\s]))$)');</p>
  <p>if (!pattern.test(content)) alert (&quot;failed&quot;)</p>
  <p>I want a RegEx that works for SRV record so : weight port hostname</p>
  <p>Where do i make the mistake ? I tested it with string: 100 100 test.nl.</p>