# oro-regexp

> REGEXP is essentially an object that holds regular expressions

Latest version **2.1.8** (published 2026-03-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install oro-regexp
pnpm add oro-regexp
yarn add oro-regexp
bun add oro-regexp
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.1.8 |
| Published | 2026-03-14 |
| First published | 2021-08-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 30.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1 |
| Author | Carlos Oropesa |
| Maintainers | oropesa |
| Keywords | constant, regexp |

## Links

- npm: https://www.npmjs.com/package/oro-regexp
- Repository: https://github.com/oropesa/oro-regexp
- Homepage: https://github.com/oropesa/oro-regexp#readme
- Issues: https://github.com/oropesa/oro-regexp/issues
- npm.io page: https://npm.io/package/oro-regexp

## Recent versions

- 2.1.8 (latest) — 2026-03-14
- 2.1.7 — 2025-10-21
- 2.1.6 — 2025-03-08
- 2.1.5 — 2024-12-13
- 2.1.4 — 2024-10-13
- 2.1.3 — 2024-09-23
- 2.1.2 — 2024-09-08
- 2.1.1 — 2024-07-09
- 2.1.0 — 2024-05-15
- 2.0.3 — 2024-01-13
- 2.0.2 — 2023-11-22
- 2.0.1 — 2023-10-24
- 2.0.0 — 2023-10-05
- 1.3.0 — 2023-04-30
- 1.2.0 — 2022-08-02
- … 3 more at https://npm.io/package/oro-regexp/versions

## README

# Oro RegExp

- [Overview](#overview)
- [Installation](#installation)
- [Example](#example)
- [Regular Expressions](#regular-expressions)

## Overview

`REGEXP` is essentially an object that holds regular expressions.

## Installation

```shell
npm install oro-regexp
```

## Example:

```js
// js
const { REGEXP } = require( 'oro-regexp' );
// or individually
const { REGEXP_EMAIL, REGEXP_URL_YOUTUBE, ... } = require( 'oro-regexp' );

// ts
import { REGEXP } from 'oro-regexp';
// or individually
import { REGEXP_EMAIL, REGEXP_URL_YOUTUBE, ... } from 'oro-regexp';
```

```js
REGEXP_EMAIL.test('info@example');
// false

REGEXP_EMAIL.test('info@example.com');
// true
```

## Regular Expressions

<hr>

- [Emails](#emails)
- [Urls](#urls)
- [Dates](#dates)

<hr>

### Emails

```js
REGEXP.EMAIL | REGEXP_EMAIL;
// example@domain.extension
// ano_ther.example+1@subdomain.domain.extension
```

<hr>

### Urls

```js
REGEXP.URL_YOUTUBE | REGEXP_URL_YOUTUBE;
// youtube.com/watch?v=ID
// https://youtube.com/watch?v=ID
// http://youtube.com/watch?v=ID
// www.youtube.com/watch?v=ID
// m.youtube.com/watch?v=ID
// youtu.be/ID
```

<hr>

### Dates

```js
REGEXP.DATETIME_DEFAULT_STRICT | REGEXP_DATETIME_DEFAULT_STRICT;
// 30-12-2020 11:59[:59]

REGEXP.DATETIME_HTML_STRICT | REGEXP_DATETIME_HTML_STRICT;
// 30/12/2020 11:59[:59]

REGEXP.DATETIME_SQL_STRICT | REGEXP_DATETIME_SQL_STRICT;
// 2020-12-30 11:59[:59]

REGEXP.DATETIME_FN_STRICT('.') | REGEXP_DATETIME_FN_STRICT('.');
// 30.12.2020 11:59[:59]
```

```js
REGEXP.DATETIME_DEFAULT | REGEXP_DATETIME_DEFAULT;
// 30-12-2020 [11:59[:59]]

REGEXP.DATETIME_HTML | REGEXP_DATETIME_HTML;
// 30/12/2020 [11:59[:59]]

REGEXP.DATETIME_SQL | REGEXP_DATETIME_SQL;
// 2020-12-30 [11:59[:59]]

REGEXP.DATETIME_FN('.') | REGEXP_DATETIME_FN('.');
// 30.12.2020 [11:59[:59]]
```

```js
REGEXP.DATE_DEFAULT | REGEXP_DATE_DEFAULT;
// 30-12-2020

REGEXP.DATE_HTML | REGEXP_DATE_HTML;
// 30/12/2020

REGEXP.DATE_SQL | REGEXP_DATE_SQL;
// 2020-12-30

REGEXP.DATE_FN('.') | REGEXP_DATE_FN('.');
// 30.12.2020
```

---
_Source: https://npm.io/package/oro-regexp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
