Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pobox-regex

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pobox-regex

Regular expression for matching PO Box addresses

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
106
increased by3.92%
Maintainers
1
Weekly downloads
 
Created
Source

pobox-regex

Regular expression for matching PO box addresses

/(?:P(?:ost(?:al)?)?[\.\-\s]*(?:(?:O(?:ffice)?[\.\-\s]*)?B(?:ox|in|\b|\d)|o(?:ffice|\b)(?:[-\s]*\d)|code)|box[-\s\b]*\d)/i

Positive List

  • PO Box 123
  • P O box 123
  • P. O. Box 123
  • P.O.Box 123
  • post box 123
  • post office box 123
  • post office 123
  • P.O.B 123
  • P.O.B. 123
  • Post Office Bin 123
  • Postal Code 123
  • Post Box #123
  • Postal Box 123
  • P.O. Box 123
  • PO. Box 123
  • P.o box 123
  • Pobox 123
  • pob 123
  • pob123
  • pobox123
  • p.o. Box123
  • po-box123
  • p.o.-box 123
  • PO-Box 123
  • p-o-box 123
  • p-o box 123
  • box 123
  • Box123
  • Box-123

Negative List

  • 123 Box Turtle Circle, Sarasota, FL
  • 123 Boxing Pass, San Antonio, TX
  • 123 Poblano Lane, Edinburg, TX
  • 123 P O Davis Drive, Auburn, AL
  • 123 Postal Circle, Manitowish Waters, WI

Install

$ npm install pobox-regex

Usage

const poboxRegex = require('pobox-regex');

poboxRegex().test('PO Box 123, Derry, ME');
// => true

poboxRegex().test('123 Box Turtle Circle, Derry, ME');
// => false

Credit

Repurposed as an npm package from EpicVoyage/pobox-regex

Keywords

FAQs

Package last updated on 03 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc