title: Angular Reactive Forms pattern validation: Invalid regular expression
body: <p>I have a regex for Australia phone number validation working in an AngularJS website. I have set the exact pattern in the Reactive Forms validator as follows:</p>
  
  <pre><code> Validators.pattern(
    '/^({0,1}((0|+61)(2|4|3|7|8))){0,1}( |-){0,1}[0-9]{2}( |-){0,1}[0-9]{2}( |-){0,1}[0-9]{1}( |-){0,1}[0-9]{3}$/'
   )
  </code></pre>
  
  <p>The page doesn't load as it gets the following error:</p>
  
  <blockquote>
    <p>Invalid regular expression: /^/^({0,1}((0|+61)(2|4|3|7|8))){0,1}( |-){0,1}[0-9]{2}( |-){0,1}[0-9]{2}( |-){0,1}[0-9]{1}( |-){0,1}[0-9]{3}$/$/: Nothing to repeat</p>
  </blockquote>
  
  <p>What is the correct way to specify this pattern when using Reactive Forms?</p>