# exact-regex

> Check if a string exactly abides a regular expression

Latest version **1.0.3** (published 2017-07-04) · 0 weekly downloads

## Install

```sh
npm install exact-regex
pnpm add exact-regex
yarn add exact-regex
bun add exact-regex
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-07-04 |
| First published | 2017-02-16 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Arpad Hegedus |
| Maintainers | arpadhegedus |

## Links

- npm: https://www.npmjs.com/package/exact-regex
- Repository: https://github.com/arpadHegedus/exact-regex
- Homepage: https://github.com/arpadHegedus/exact-regex#readme
- Issues: https://github.com/arpadHegedus/exact-regex.git/issues
- npm.io page: https://npm.io/package/exact-regex

## Recent versions

- 1.0.3 (latest) — 2017-07-04
- 1.0.2 — 2017-02-16
- 1.0.1 — 2017-02-16
- 1.0.0 — 2017-02-16

## README

Check if a string exactly abides a regular expression

## Installation

```js
npm install exact-regex
```

## Example
```js
let exactRegex = require('exact-regex');

let value1 = '14px';
let value2 = ' 14px';
let value3 = '14';
let value4 = 'string';
let value5 = 'auto';
let value6 = 'inherit';
let value7 = '-5px';
let value8 = '-5';

let regex = /(auto|inherit|initial|0|(\-)?([0-9\.]+)(px|\%|em|rem|cm|mm|ch|pica|in|pt|pc|ex|vw|vh|vmin|vmax))/gi;

exactRegex(value1, regex); // returns true
exactRegex(value2, regex); // returns true
exactRegex(value3, regex); // returns false
exactRegex(value4, regex); // returns false
exactRegex(value5, regex); // returns true
exactRegex(value6, regex); // returns true
exactRegex(value7, regex); // returns true
exactRegex(value8, regex); // returns false
```

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