Skip to content

Instantly share code, notes, and snippets.

@timbillstrom
Created January 5, 2020 16:50
Show Gist options
  • Select an option

  • Save timbillstrom/07e15921c9ce4ba3bab4a68919a31820 to your computer and use it in GitHub Desktop.

Select an option

Save timbillstrom/07e15921c9ce4ba3bab4a68919a31820 to your computer and use it in GitHub Desktop.

Revisions

  1. timbillstrom created this gist Jan 5, 2020.
    6 changes: 6 additions & 0 deletions SwedishMobilePhone_regex.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    var regex = /0\s*(7[02369])\s*(\d{4})\s*(\d{3})$/gm;
    var found = phone.match(regex);

    if (found) {
    console.debug('valid: ', found);
    }