Guest User

Untitled

a guest
Dec 19th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. function GetCountryRegex() {
  2. if (scope.countryCode == "DE") {
  3. return '/^(?!01000|99999)(0[1-9]d{3}|[1-9]d{4})$/';
  4. }
  5. if (scope.countryCode == "AT") {
  6. return '/^\d{4}$/';
  7. }
  8. }
  9.  
  10. var regExp = new RegExp(GetCountryRegex());
  11. regExp.test(...);
Add Comment
Please, Sign In to add comment