reg-exp-generate-node
v1.0.4
Published
an regular expression parser by javascript
Downloads
3
Readme
REG-EXP-GENERATE_NODE
将正则表达式解析成节点树
用法
/**
*
* @param {*} exp 正则表达式字符串
* @returns
*/
generateNode('abc(?=123[a-z])');
//返回结果
result = {
expNodeList : [
CharsNode('abc'),
AssertionsNode([
CharsNode('123'),
CharSetNode([
RangeCharSetNode(97, 122)
])
])
],
groupNum : 0
}