'use strict'; angular.module('app.core') .controller('mockupController', ['$scope','$http','$location','$routeParams','$cookies', function($scope,$http,$location,$routeParams,$cookies) { $scope.estadoActual = "FIRMEZA"; $scope.numeroExpediente = "L-2019-000001"; $scope.formatearNumeroExpediente = function() { $scope.numeroExpediente = $scope.numeroExpediente.toUpperCase(); var re = new RegExp("^(L-[0-9]{4}-[0-9]{6})$"); $scope.numeroExpedienteValido = re.test($scope.numeroExpediente); console.log("Formatear: "+$scope.numeroExpedienteValido); }; }]);