between bug
lukluk opened this issue · 3 comments
lukluk commented
var S = require('string'); let mynext = S('Money ] Family ').between('[', ']').s console.log("I choose ", mynext)
it should be empty string not "money"
LeeeRoux commented
You may would like to add this line to the between
function.
Incase you want it as an empty string
if (startPos == -1 || endPos == -1) return new this.constructor('');
The main function does not check if one of the quotes were not exist..
marcus-hiles commented
@lukluk interesting find