Git Product home page Git Product logo

nanpatelephoneformatdetection's Introduction

NANPATelephoneFormatDetection

North American Numbering Plan The formatting rules:

  • Easily Recognizable Codes When the second and third digits of an area code are the same, that code is called an easily recognizable code (ERC). ERCs designate special services; e.g., 888 for toll-free service.

  • N11 These 8 ERCs, called service codes, are not used as area codes.

  • N9X The 80 codes in this format, called expansion codes, have been reserved for use during the period when the current 10-digit NANP number format undergoes expansion.

  • 37X and 96X Two blocks of 10 codes each have been set aside by the INC for unanticipated purposes where it may be important to have a full range of 10 contiguous codes available.

  • (?<ERC>^([2-9](11|22|33|44|55|66|77|88|99)$))|

    • (
      • (?<NonGeoSvc>^(5(00|21|22|23|24|25|26|27|28|29|33|44|66|77|88))|
      • (?<CAservices>^(6(00|22))|
      • (?<InterExch>^(700))|
      • (?<USgovt>^(710))|
      • (?<TollFree>^(8(00|33|44|55|66|77|88)))|
      • (?<Premium>^(900)
    • )(?<SpecExchange>([2-9][0-9][0-9])-(?<SpecNumber>[0-9]{4}))
  • (?<ReservedAreaCode>([2-9]9[0-9])|((37|96)[0-9]))-[2-9][0-9][0-9]-[0-9]{4}$

  • (?<InfoAreaCode>^([2-9][0-8][0-9])-555-(?<InfoNum>(1212|4334)$)|

  • (?<EntAreaCode>^[2-9][0-8][0-9])-555-(?<EntNumber>(01[0-9][0-9]))$|

  • (?<AreaCode>([2-9][0-8][0-9]))-(?<Exchange>([2-9][0-9][0-9]))-(?<Number>([0-9]{4}))$

The rules:

  1. Numbers must be in the following format: ddd, or ddd-ddd-dddd. No parentheses are allowed.
  2. If ERC is a group that is matched and the length is greater than 3, the number is invalid.

Zip file of Central Office Codes Report โ€” Updated daily

nanpatelephoneformatdetection's People

Contributors

github-actions[bot] avatar ralphhightower avatar

Stargazers

 avatar

Watchers

 avatar  avatar

nanpatelephoneformatdetection's Issues

Build fails: jekyll.yml

Describe the bug
Build fails.

To Reproduce

  1. Build with jekyll.yml
  2. Watch error happen

Expected behavior
Page builds

Screenshots
Log below:
Jobs
Run details
build
failed 25 minutes ago in 8s
Search logs
4s
Current runner version: '2.301.1'
Operating System
Ubuntu
22.04.1
LTS
Runner Image
Image: ubuntu-22.04
Version: 20230122.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230122.1/images/linux/Ubuntu2204-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230122.1
Runner Image Provisioner
2.0.98.1
GITHUB_TOKEN Permissions
Contents: read
Metadata: read
Pages: write
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v3' (SHA:ac593985615ec2ede58e132d2e21d2b1cbd6127c)
Download action repository 'ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4' (SHA:ee2113536afb7f793eed4ce60e8d3b26db912da4)
Download action repository 'actions/configure-pages@v2' (SHA:c5a3e1159e0cbdf0845eb8811bd39e39fc3099c2)
Download action repository 'actions/upload-pages-artifact@v1' (SHA:253fd476ed429e83b7aae64a92a75b4ceb1a17cf)
Getting action download info
Download action repository 'actions/upload-artifact@main' (SHA:65d862660abb392b8c4a3d1195a2108db131dd05)
Complete job name: build
1s
Run actions/checkout@v3
with:
repository: RalphHightower/NANPATelephoneFormatDetection
token: ***
ssh-strict: true
persist-credentials: true
clean: true
fetch-depth: 1
lfs: false
submodules: false
set-safe-directory: true
Syncing repository: RalphHightower/NANPATelephoneFormatDetection
Getting Git version info
Working directory is '/home/runner/work/NANPATelephoneFormatDetection/NANPATelephoneFormatDetection'
/usr/bin/git version
git version 2.39.1
Temporarily overriding HOME='/home/runner/work/_temp/5bf77e93-64e5-422b-b44c-cd97f6c97cdc' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/NANPATelephoneFormatDetection/NANPATelephoneFormatDetection
Deleting the contents of '/home/runner/work/NANPATelephoneFormatDetection/NANPATelephoneFormatDetection'
Initializing the repository
/usr/bin/git init /home/runner/work/NANPATelephoneFormatDetection/NANPATelephoneFormatDetection
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m
Initialized empty Git repository in /home/runner/work/NANPATelephoneFormatDetection/NANPATelephoneFormatDetection/.git/
/usr/bin/git remote add origin https://github.com/RalphHightower/NANPATelephoneFormatDetection
Disabling automatic garbage collection
/usr/bin/git config --local gc.auto 0
Setting up auth
/usr/bin/git config --local --name-only --get-regexp core.sshCommand
/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
Fetching the repository
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +a9cddde599409209501ed7a812c714380d735948:refs/remotes/origin/main
remote: Enumerating objects: 13, done.
remote: Counting objects: 7% (1/13)
remote: Counting objects: 15% (2/13)
remote: Counting objects: 23% (3/13)
remote: Counting objects: 30% (4/13)
remote: Counting objects: 38% (5/13)
remote: Counting objects: 46% (6/13)
remote: Counting objects: 53% (7/13)
remote: Counting objects: 61% (8/13)
remote: Counting objects: 69% (9/13)
remote: Counting objects: 76% (10/13)
remote: Counting objects: 84% (11/13)
remote: Counting objects: 92% (12/13)
remote: Counting objects: 100% (13/13)
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 9% (1/11)
remote: Compressing objects: 18% (2/11)
remote: Compressing objects: 27% (3/11)
remote: Compressing objects: 36% (4/11)
remote: Compressing objects: 45% (5/11)
remote: Compressing objects: 54% (6/11)
remote: Compressing objects: 63% (7/11)
remote: Compressing objects: 72% (8/11)
remote: Compressing objects: 81% (9/11)
remote: Compressing objects: 90% (10/11)
remote: Compressing objects: 100% (11/11)
remote: Compressing objects: 100% (11/11), done.
remote: Total 13 (delta 1), reused 3 (delta 1), pack-reused 0
From https://github.com/RalphHightower/NANPATelephoneFormatDetection

  • [new ref] a9cddde -> origin/main
    Determining the checkout info
    Checking out the ref
    /usr/bin/git checkout --progress --force -B main refs/remotes/origin/main
    Switched to a new branch 'main'
    branch 'main' set up to track 'origin/main'.
    /usr/bin/git log -1 --format='%H'
    'a9cddde599409209501ed7a812c714380d735948'
    1s
    Run ruby/setup-ruby@ee21135
    with:
    ruby-version: 3.0
    bundler-cache: true
    cache-version: 0
    Modifying PATH
    Entries added to PATH to use selected Ruby:
    /opt/hostedtoolcache/Ruby/3.0.5/x64/bin
    Downloading Ruby
    https://github.com/ruby/ruby-builder/releases/download/toolcache/ruby-3.0.5-ubuntu-22.04.tar.gz
    Took 0.73 seconds
    Extracting Ruby
    /usr/bin/tar -xz -C /opt/hostedtoolcache/Ruby/3.0.5 -f /home/runner/work/_temp/92730341-3a9d-4a47-b6e8-f20adc4c8eba
    Took 0.60 seconds
    Print Ruby version
    /opt/hostedtoolcache/Ruby/3.0.5/x64/bin/ruby --version
    ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [x86_64-linux]
    Took 0.02 seconds
    Installing Bundler
    Using Bundler 2 shipped with ruby-3.0.5
    Took 0.00 seconds
    bundle install
    Could not determine gemfile path, skipping "bundle install" and caching
    Took 0.00 seconds
    0s
    Run actions/configure-pages@v2
    with:
    token: ***
    enablement: true
    0s
    Run bundle exec jekyll build --baseurl "/NANPATelephoneFormatDetection"
    bundle exec jekyll build --baseurl "/NANPATelephoneFormatDetection"
    shell: /usr/bin/bash -e {0}
    env:
    GITHUB_PAGES: true
    JEKYLL_ENV: production
    Could not locate Gemfile or .bundle/ directory
    Error: Process completed with exit code 10.
    0s
    0s
    Post job cleanup.
    /usr/bin/git version
    git version 2.39.1
    Temporarily overriding HOME='/home/runner/work/_temp/a8f1eea3-6b9a-49c8-8c08-9ae9e71ffaec' before making global git config changes
    Adding repository directory to the temporary git global config as a safe directory
    /usr/bin/git config --global --add safe.directory /home/runner/work/NANPATelephoneFormatDetection/NANPATelephoneFormatDetection
    /usr/bin/git config --local --name-only --get-regexp core.sshCommand
    /usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
    /usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
    http.https://github.com/.extraheader
    /usr/bin/git config --local --unset-all http.https://github.com/.extraheader
    /usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
    1s
    Cleaning up orphan processes

Desktop (please complete the following information):

  • Not applicable

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S22 Ultra
  • OS: Android 13 5.10.81-android12-9-25490797-abS908USQS2BWA2
  • Browser Google Chrome
  • Version 109.0.5414.118

Additional context
Add any other context about the problem here.

fix: missing string concatenation

"(?^(2-9$))|" +
"(" +
"(?^(5[00|21|22|23|24|25|26|27|28|29|33|44|66|77|88]))|" +
"(?^(6[00|22]))|" +
"(?^(700))|" +
"(?^(710))|" +
"(?^(8[00|33|44|55|66|77|88]))|" +
"(?^(900)" +
")(?([2-9][0-9][0-9])-(?[0-9]{4}))$" +
"(?([2-9]9[0-9])|((37|96)[0-9]))-[2-9][0-9][0-9]-[0-9]{4}$" +
"(?^([2-9][0-8][0-9]))-555-(?(1212|4334))$|" +
"(?^[2-9][0-8][0-9])-555-(?(01[0-9][0-9]))$|" +
"(?([2-9][0-8][0-9]))-(?([2-9][0-9][0-9]))-(?([0-9]{4}))$";

ERC has 1 8, optimize expressions

Describe the bug
ERC only has 811. 822 is not assigned as a toll free.
Steps to reproduce the behavior:
Eyeball check and editing with insiders.vscode.dev syntaxes highlighting.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

fix: delete jekyll.yml

Describe the bug
Build fails.

To Reproduce

  1. Build with jekyll.yml
  2. Watch error happen

Expected behavior
Page builds

Screenshots
Log below:
Jobs
Run details
build
failed 25 minutes ago in 8s
Search logs
4s
Current runner version: '2.301.1'
Operating System
Ubuntu
22.04.1
LTS
Runner Image
Image: ubuntu-22.04
Version: 20230122.1
Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230122.1/images/linux/Ubuntu2204-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230122.1
Runner Image Provisioner
2.0.98.1
GITHUB_TOKEN Permissions
Contents: read
Metadata: read
Pages: write
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v3' (SHA:ac593985615ec2ede58e132d2e21d2b1cbd6127c)
Download action repository 'ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4' (SHA:ee2113536afb7f793eed4ce60e8d3b26db912da4)
Download action repository 'actions/configure-pages@v2' (SHA:c5a3e1159e0cbdf0845eb8811bd39e39fc3099c2)
Download action repository 'actions/upload-pages-artifact@v1' (SHA:253fd476ed429e83b7aae64a92a75b4ceb1a17cf)
Getting action download info
Download action repository 'actions/upload-artifact@main' (SHA:65d862660abb392b8c4a3d1195a2108db131dd05)
Complete job name: build
1s
Run actions/checkout@v3
with:
repository: RalphHightower/NANPATelephoneFormatDetection
token: ***
ssh-strict: true
persist-credentials: true
clean: true
fetch-depth: 1
lfs: false
submodules: false
set-safe-directory: true
Syncing repository: RalphHightower/NANPATelephoneFormatDetection
Getting Git version info
Working directory is '/home/runner/work/NANPATelephoneFormatDetection/NANPATelephoneFormatDetection'
/usr/bin/git version
git version 2.39.1
Temporarily overriding HOME='/home/runner/work/_temp/5bf77e93-64e5-422b-b44c-cd97f6c97cdc' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/NANPATelephoneFormatDetection/NANPATelephoneFormatDetection
Deleting the contents of '/home/runner/work/NANPATelephoneFormatDetection/NANPATelephoneFormatDetection'
Initializing the repository
/usr/bin/git init /home/runner/work/NANPATelephoneFormatDetection/NANPATelephoneFormatDetection
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m
Initialized empty Git repository in /home/runner/work/NANPATelephoneFormatDetection/NANPATelephoneFormatDetection/.git/
/usr/bin/git remote add origin https://github.com/RalphHightower/NANPATelephoneFormatDetection
Disabling automatic garbage collection
/usr/bin/git config --local gc.auto 0
Setting up auth
/usr/bin/git config --local --name-only --get-regexp core.sshCommand
/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
Fetching the repository
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +a9cddde599409209501ed7a812c714380d735948:refs/remotes/origin/main
remote: Enumerating objects: 13, done.
remote: Counting objects: 7% (1/13)
remote: Counting objects: 15% (2/13)
remote: Counting objects: 23% (3/13)
remote: Counting objects: 30% (4/13)
remote: Counting objects: 38% (5/13)
remote: Counting objects: 46% (6/13)
remote: Counting objects: 53% (7/13)
remote: Counting objects: 61% (8/13)
remote: Counting objects: 69% (9/13)
remote: Counting objects: 76% (10/13)
remote: Counting objects: 84% (11/13)
remote: Counting objects: 92% (12/13)
remote: Counting objects: 100% (13/13)
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 9% (1/11)
remote: Compressing objects: 18% (2/11)
remote: Compressing objects: 27% (3/11)
remote: Compressing objects: 36% (4/11)
remote: Compressing objects: 45% (5/11)
remote: Compressing objects: 54% (6/11)
remote: Compressing objects: 63% (7/11)
remote: Compressing objects: 72% (8/11)
remote: Compressing objects: 81% (9/11)
remote: Compressing objects: 90% (10/11)
remote: Compressing objects: 100% (11/11)
remote: Compressing objects: 100% (11/11), done.
remote: Total 13 (delta 1), reused 3 (delta 1), pack-reused 0
From https://github.com/RalphHightower/NANPATelephoneFormatDetection

  • [new ref] a9cddde -> origin/main
    Determining the checkout info
    Checking out the ref
    /usr/bin/git checkout --progress --force -B main refs/remotes/origin/main
    Switched to a new branch 'main'
    branch 'main' set up to track 'origin/main'.
    /usr/bin/git log -1 --format='%H'
    'a9cddde599409209501ed7a812c714380d735948'
    1s
    Run ruby/setup-ruby@ee21135
    with:
    ruby-version: 3.0
    bundler-cache: true
    cache-version: 0
    Modifying PATH
    Entries added to PATH to use selected Ruby:
    /opt/hostedtoolcache/Ruby/3.0.5/x64/bin
    Downloading Ruby
    https://github.com/ruby/ruby-builder/releases/download/toolcache/ruby-3.0.5-ubuntu-22.04.tar.gz
    Took 0.73 seconds
    Extracting Ruby
    /usr/bin/tar -xz -C /opt/hostedtoolcache/Ruby/3.0.5 -f /home/runner/work/_temp/92730341-3a9d-4a47-b6e8-f20adc4c8eba
    Took 0.60 seconds
    Print Ruby version
    /opt/hostedtoolcache/Ruby/3.0.5/x64/bin/ruby --version
    ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [x86_64-linux]
    Took 0.02 seconds
    Installing Bundler
    Using Bundler 2 shipped with ruby-3.0.5
    Took 0.00 seconds
    bundle install
    Could not determine gemfile path, skipping "bundle install" and caching
    Took 0.00 seconds
    0s
    Run actions/configure-pages@v2
    with:
    token: ***
    enablement: true
    0s
    Run bundle exec jekyll build --baseurl "/NANPATelephoneFormatDetection"
    bundle exec jekyll build --baseurl "/NANPATelephoneFormatDetection"
    shell: /usr/bin/bash -e {0}
    env:
    GITHUB_PAGES: true
    JEKYLL_ENV: production
    Could not locate Gemfile or .bundle/ directory
    Error: Process completed with exit code 10.
    0s
    0s
    Post job cleanup.
    /usr/bin/git version
    git version 2.39.1
    Temporarily overriding HOME='/home/runner/work/_temp/a8f1eea3-6b9a-49c8-8c08-9ae9e71ffaec' before making global git config changes
    Adding repository directory to the temporary git global config as a safe directory
    /usr/bin/git config --global --add safe.directory /home/runner/work/NANPATelephoneFormatDetection/NANPATelephoneFormatDetection
    /usr/bin/git config --local --name-only --get-regexp core.sshCommand
    /usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
    /usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
    http.https://github.com/.extraheader
    /usr/bin/git config --local --unset-all http.https://github.com/.extraheader
    /usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
    1s
    Cleaning up orphan processes

Desktop (please complete the following information):

  • Not applicable

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S22 Ultra
  • OS: Android 13 5.10.81-android12-9-25490797-abS908USQS2BWA2
  • Browser Google Chrome
  • Version 109.0.5414.118

Additional context
Add any other context about the problem here.

Easily Recognizable Codes do not begin with 8.

Describe the bug
8 should not be in the Easily Recognizable Codes.

To Reproduce
Caught during eyeball check

Expected behavior
Numbers beginning with 8 are reserved for area codes.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.