Skip to main content
Home

latest
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
64%
Published
2 years ago (0.0.1)

The Js Collection of Regular Expressions

A handmade collection of regular expressions for JavaScript.

Fully tested and documented.

Mainly assisted by github copilot and tweaked by me.

Ready to be imported or copy pasted into your code.

Scope

  • numbers

    • integers
    • floats
    • hexadecimals
    • octal
    • binary
    • Roman numerals
    • base64
    • base32
    • bigInt
  • emails

  • uris

    • url
    • hostname
    • ipv4
    • ipv4 CIDR
    • ipv6
    • ipv6 CIDR
    • subnet masks
    • private ips v4
    • private ips v6
    • uri
    • uri protocols/schemes
  • colors

    • hex
    • rgb
    • hsl
    • hsv
    • cmyk
  • eval JS

    • JS reserved words
    • JS Identifier Name (variable/function/class names)
    • JS classic function
    • JS arrow function
    • JS class
    • JS anonymous function
    • JS generator function
    • JS async function
    • JS async generator function
    • JS global scope variables (Deno, Node, Browser)
    • JS pure function
  • case

    • camelCase
    • kebab-case
    • snake_case
    • PascalCase
    • CONSTANT_CASE
  • dates

  • time

  • currency

  • phone numbers

  • postal codes

  • credit

  • uuid

  • iban

  • bic

  • json

  • html tags

  • mime types

  • file extensions

  • mac addresses

  • passwords

  • credit card

  • semver

  • conventional commit messages

  • git references

Contributing

Sources of inspiration

https://www.npmjs.com/package/regexpattern-collection

https://www.npmjs.com/package/regexps

https://github.com/fonsecapontes/Regex-Awesome

https://github.com/OpenCode/awesome-regex

https://github.com/dunizb/JS-Regular-expression-awesome

https://github.com/agungnursatria/regexpattern/blob/master/lib/src/regex_pattern.dart

https://github.com/1337z/regex-collection/blob/master/src/index.ts

https://github.com/lukehaas/RegexHub/blob/master/src/data/index.js

https://regexr.com/3ashn

https://regex101.com/library?filterFlavors=javascript&orderBy=MOST_POINTS&search=

https://regexlib.com/UserPatterns.aspx?authorId=a31a0874-118f-4550-933e-a7c575d149ae

https://github.com/Archakov06/rgxp/blob/master/src/assets/patterns.json

https://github.com/nicoandresr/regexlib/blob/master/index.ts

https://atrilsolutions.zendesk.com/hc/en-us/articles/205539861-Useful-regular-expressions

https://github.com/deno-library/isuuid/blob/master/mod.ts

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@garn/regexp

Import symbol

import * as regexp from "@garn/regexp";
or

Import directly with a jsr specifier

import * as regexp from "jsr:@garn/regexp";

Add Package

pnpm i jsr:@garn/regexp
or (using pnpm 10.8 or older)
pnpm dlx jsr add @garn/regexp

Import symbol

import * as regexp from "@garn/regexp";

Add Package

yarn add jsr:@garn/regexp
or (using Yarn 4.8 or older)
yarn dlx jsr add @garn/regexp

Import symbol

import * as regexp from "@garn/regexp";

Add Package

vlt install jsr:@garn/regexp

Import symbol

import * as regexp from "@garn/regexp";

Add Package

npx jsr add @garn/regexp

Import symbol

import * as regexp from "@garn/regexp";

Add Package

bunx jsr add @garn/regexp

Import symbol

import * as regexp from "@garn/regexp";