regextract
Extracting text with Regular Expression
Install
npm install regextract --save
API
var result = ;
result.matches
Type: Array
Matches of RegExp patterns to the source text.
result.extracts
Type: Array
Captured groups of capturing parentheses within RegExp patterns to the source text.
result.captured
Type: Array
Alias to result.extracts
.
Usage
Require package
var extract = ;
Find matches
; // You'll get: matches: 'iPhone6' 'iPhone7' 'iPhone8' extracts:
Get extracted texts
// You'll get: matches: 'NTD$299' extracts: '299'
License
MIT