If i try to create regex anywhere in my code angular throws an error "Unexpected quantifier"? Why? This regex is valid, tested and works but if I try
var p = new RegExp("^(.{1,19}\*|\*.{1,19}|(?!\*).{1,20})$");
angular will throw an error. However this simple, dummy regex will not.
var pattern = new RegExp("^(.)$");
This leads me to believe that it is a matter of escaping of characters or something?