title: Ui-router route parameter with regex
body: <p>I feel like this is simple but I can't get it to work...</p>
  
  <p>I am using <a href="https://github.com/angular-ui/ui-router" rel="nofollow noreferrer">Ui-Router</a> 2.11 which includes optional parameters  <a href="https://github.com/angular-ui/ui-router/wiki/URL-Routing#regex-parameters" rel="nofollow noreferrer">with regex expressions.</a></p>
  
  <p>I have this url which <strong>works</strong> </p>
  
  <p><code>'/event/{eventId:[0-9]}'</code></p>
  
  <p>it filters out everything that isn't numeric, however it only works for 1 character of input (so only 0 through 9). </p>
  
  <p>I want to replace it with an expression that checks to make sure all characters in the input are numeric so I can have any input as long as it's all numbers.</p>
  
  <p>I tried using expressions from <a href="https://stackoverflow.com/questions/9011524/javascript-regexp-number-only-check">this thread</a> </p>
  
  <p><code>'/event/{eventId:^[0-9]+$}'</code></p>
  
  <p>but it doesn't work. The other examples include forward slashes which I can't use(via the <a href="https://github.com/angular-ui/ui-router/wiki/URL-Routing#regex-parameters" rel="nofollow noreferrer">warning</a> in the ui-router docs). This feels like it should be incredibly simple, what am I doing wrong?</p>