i want to concatenate string with regular expression
my regular expression is
$scope.searchEstimateMeasures = Ne;
var exp = new RegExp("/^" + $scope.searchEstimateMeasures +"/i");
when i am trying to test this regualr expression using
if (exp.test(Net Value))
i am getting an error saying object doesnot support property or method test
i tried using
var exp = new RegExp('/^' + $scope.searchEstimateMeasures +'/i');
but it is returning false.
if i use regex directly(/^ne/i.test(Net Value))
i am getting true.