jsgex
v1.0.0
Published
Not a replacement for REGEX, but an alternative that is far more readable and a bit more flexible
Downloads
3
Maintainers
Readme
jsgex
Not a replacement for REGEX, but an alternative that is far more readable and a bit more flexible
Check tests directory for examples of usage below API functions
createMatcher
when matcher is created it returns simple function to match within given text and starting at optionally given position
const matchResult = someMatcherCreatedWithOneOfCreateMatchFunc(text, position); //position is optional
that function returns an object, an example:
{ start: 18,
result:
{ /*data provided as match result*/ },
length: 1,
matched: ')',
chain: undefined,
end: 19,
endOfChains: 19,
endOfText: 19,
text: ')'
}