Skip to content

@technobuddha > library > RegExp

Constants

NameTypeDescription
ansiEscapesConstantRegular expression that matches ANSI escape sequences, including OSC (Operating System Command) and CSI (Control Sequence Introducer) patterns. Useful for stripping or identifying ANSI codes in strings, such as those used for terminal text formatting.
domainConstantRegular expression for matching a domain name composed of a host and a top-level domain (TLD).
emailConstantvalidate an valid email address
ipV4Constantvalidate an IPv4 address
ipV4LocalConstantdetermine if Ipv4 address is local
isoDateConstantValidate a ISO formatted date
numericConstantValidate a valid number
trimEquivalentConstantRegular expression that matches any whitespace character, including standard spaces, non-breaking spaces (\u00A0), and zero-width no-break spaces (\uFEFF). Useful for trimming or identifying whitespace-equivalent characters in strings.