Returns array with strings between start and end
Install
Install all functions of strman
yarn add strmanor just the between function
yarn add strman.betweenUsage
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']