daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Mar 24th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function matchPhoneNumbers(numbers) {
  2.     let pattern =/+359([ -]) 2\1 \d{3} \d{4}/g;
  3.     let validPhones = [];
  4.  
  5.     while ((validPhone = pattern.exec(phoneNumbers)) !==null) {
  6.         validPhones.push(validPhone[0]);
  7.     }
  8.     console.log(validPhones.join(', '));
  9.    
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top