Skip to content

Instantly share code, notes, and snippets.

@ilyaskarim
Last active December 3, 2022 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilyaskarim/ab639182444786dc5d713e58b48d4769 to your computer and use it in GitHub Desktop.
Save ilyaskarim/ab639182444786dc5d713e58b48d4769 to your computer and use it in GitHub Desktop.
Ai generated code

/* I need a function which checks if a string is a pakistani phone number */

function isPakistaniPhoneNumber(phoneNumber) {
  var phoneNumberRegex = /^\+92[0-9]{10}$/;
  return phoneNumberRegex.test(phoneNumber);
}

/* /* I need a function which checks if a string is a indian phone number */ */

function isIndianPhoneNumber(phoneNumber) {
  var phoneNumberRegex = /^\+91[0-9]{10}$/;
  return phoneNumberRegex.test(phoneNumber);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment