🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

search-nth

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

search-nth

Executes a search for nth match

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

search-nth

Executes a search for nth match

The search-nth founds a pattern in a string, and then returns index of nth match. Similar to search() method.

Install

npm install --save search-nth

Usage

const search = require('search-nth');

const pattern = /\b\d+\b/;
const date = '21 2017 16:59:11';

search(date, pattern, 2)
//=> 3

License

MIT © Ömer Ufuk Efendioğlu

Keywords

search

FAQs

Package last updated on 21 Feb 2017

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