Open sunnypp opened 5 years ago
I don't know if this is actively maintained.
I looked into the code and see _generateSubjectRegex required a sort(), while we can traverse in another order to avoid the sort.
_generateSubjectRegex
for (let currLength = subject.length; currLength > 0; currLength--) { for ( let startIndex = 0; startIndex + currLength <= subject.length; startIndex++ ) { let sequence = subject.substr(startIndex, currLength);
Also, it generates duplicated substrings. I haven't checked its impact on Regex.
I don't know if this is actively maintained.
I looked into the code and see
_generateSubjectRegex
required a sort(), while we can traverse in another order to avoid the sort.Also, it generates duplicated substrings. I haven't checked its impact on Regex.