0.0.21 • Published 6 years ago

vamtiger-regex-period v0.0.21

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

VAMTIGER Regex Period

A regular expression to match a period character(s) for a defined input string.

Installation

VAMTIGER Regex Period can be installed using npm or yarn:

npm i --save vamtiger-regex-period

or

yarn add vamtiger-regex-period

Usage

Import or require a referece to VAMTIGER Regex Period:

/// <reference path="../node_modules/vamtiger-regex-period/build/index.d.ts"/>
import { regex } from 'vamtiger-regex-period';

or

const { regex } = require('vamtiger-regex-period');

VAMTIGER Regex Period can then be used to match a period:

const string = 'perion in then . middle';
const match = string.match(regex);


/**
 * if (match) {
 *     // Yep, the input string contains a period
 * }
 **/

Other regular expressions include:

  • globalRegex
  • multilineRegex
  • globalMultilineRegex
import { regex, globalRegex, multilineRegex, globalMultilineRegex } from 'vamtiger-regex-period';

const string = '1.2.3';
const multiLineString = `
    1.2
    3.4
`;

string.split(regex); // [ '1', '2', '3' ]
string.replace(regex, '*'); // '1*2.3'
string.replace(globalRegex, '*'); // '1*2*3'
multiLineString.replace(multilineRegex, '*'); // '\n    1*2\n    3.4\n'
multiLineString.replace(globalMultilineRegex, '*'); // '\n    1*2\n    3*4\n'
0.0.21

6 years ago

0.0.20

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago