Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetCountryRegex() {
- if (scope.countryCode == "DE") {
- return '/^(?!01000|99999)(0[1-9]d{3}|[1-9]d{4})$/';
- }
- if (scope.countryCode == "AT") {
- return '/^\d{4}$/';
- }
- }
- var regExp = new RegExp(GetCountryRegex());
- regExp.test(...);
Add Comment
Please, Sign In to add comment