Returns array with strings between start
and end
Install
Install all functions of strman
yarn add strman
or just the between function
yarn add strman.between
Usage
import { between } from 'strman'
// OR
import between from 'strman.between'
Parameters:
Name | Type | Description |
---|---|---|
value |
String | Input string |
start |
String | The start string to look for |
end |
String | The end string to look for |
- Source:
Returns:
An array with all the matches between a pair of start
and end
- Type
- Array.<String>
Example
strman.between('[abc][def]', '[', ']')
// => ['abc', 'def']