string or regex to match before
string or regex to match after
A generator function that takes a string and an optional boolean parameter. The generator function yields nodes of type IRegexScopeTreeNode.
Optional
yieldOnlyRootNodes: booleanIf a match does not recognize itself as neither left nor right.
const generator = regexScopeTree('(', ')')
const iterable = generator('(1+((3)+(1)))+(15+(21-(521))))', true)
console.dir([...iterable], { depth: null })
Generated using TypeDoc
Builds a regex that matches a string between two strings. Supports regex instead of string.