I'm terrible with regular expressions but I was wondering if it was possible to use ng-pattern with a variable
For example,
ng-pattern="/^{{validationCode}}$/"
where validationCode is a variable attached to $scope in a controller
// Inside Controller
$scope.validationCode = 'response returned from server'
If
$scope.validationCode = 1234123412351234
then the ng-pattern would be
ng-pattern="/^1234123412351234$/"
But this isn't working and it seems like I need to create a custom directive which I don't really want