invalidDomainChars top-level constant

String const invalidDomainChars

invalidDomainChars is a constant RegExp pattern string, designed to match any characters that are considered invalid within a domain name context.

It is constructed from the following components:

  • [punct] is intended to represent any punctuation characters.
  • [spacesGroup] matches any characters considered as whitespace or spaces.
  • [invalidCharsGroup] is meant to match any other characters that are invalid in domain names.
  • [directionalMarkersGroup] is designed to match any Unicode directional markers.

Implementation

const invalidDomainChars =
    '$punct$spacesGroup$invalidCharsGroup$directionalMarkersGroup';