🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

regex-easy

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regex-easy

simple regular expression utility for node

1.0.19
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Simple and easy regular expression utility for node

Using npm:

$ npm i -g npm
$ npm i --save regex-easy

In Node.js:

// Load the package
let re = require('regex-easy');

Usage

  • Regular expression usage
let r = new re.regex(pattern[string], flags[optional|string], escape[optional|boolean]);

// Methods
r.exec(string) //executes a search for a match in a string. It returns an array of information or null on a mismatch.

r.test(string) // method that tests for a match in a string. It returns true or false.
  • Independent Methods
re.escape(string); // Escaping user input that is to be treated as a literal string within a regular expression—that would otherwise be mistaken for a special character

To read more about regular expressions

  • Mozilla Documentation
  • Eloquent Javascript
  • Codeburst
  • Awesome Collection of Resources

About

Contributing

Pull requests are always welcome. For bugs and feature requests, please create an issue.

Running Tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm i --save regex-easy && cd node_modules/regex-easy/ && npm test && cd ../../

Author

Sameer Saini

Let's connect

Keywords

regex

FAQs

Package last updated on 07 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts