Adding named group capture

This commit is contained in:
LiHS
2019-08-15 13:59:41 +08:00
parent 8762ad13ab
commit ac8d90e65a
3 changed files with 15 additions and 1 deletions
+7
View File
@@ -13,6 +13,9 @@ describe('parser/javascript/subexp.js', function() {
'(test)': {
regexp: jasmine.objectContaining({ textValue: 'test' })
},
'(?<name>test)': {
regexp: jasmine.objectContaining({ textValue: 'test' })
},
'(?=test)': {
regexp: jasmine.objectContaining({ textValue: 'test' })
},
@@ -95,6 +98,10 @@ describe('parser/javascript/subexp.js', function() {
label: 'group #1',
groupCounter: 2
},
'(?<name>test)': {
label: 'group \'name\'',
groupCounter: 1
},
'(?=test)': {
label: 'positive lookahead',
groupCounter: 1