Skip to the content

address-plusアドレスプラス

Parse, validate, format and compare addresses locally, add country modules and mount an optional native form field.

address-plus extends the parse-address style with typed results, validation, formatting and country modules. About the name

Contents

Reference · Parsing, formatting and shared types

PARENTHETICAL_PATTERNconstant

Words in parentheses inside an address; group 1 is what is inside them.

Import it

import { PARENTHETICAL_PATTERN } from "@johnmorrisdotca/address-plus";

Definition

const PARENTHETICAL_PATTERN: RegExp = /\(([^)]+)\)/g

Examples

import { PARENTHETICAL_PATTERN } from "@johnmorrisdotca/address-plus";

console.log(PARENTHETICAL_PATTERN.exec("123 Main St (Rear)")?.[1]);
// → "Rear"
Rear

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/address-plus 1.7.0.