-
Notifications
You must be signed in to change notification settings - Fork 454
Closed
Description
Hi there, i'm trying to parsing an input with regex using a non-capturing parenthesis (?:). However Jison's lexer is getting the whole match while it should get only the group match. Take a look at the following code:
this.yytext += match[0];
The length of match array is 2 and the group match is at position 1.
The input that i'm trying to parse is
: request --color #ABCDEF'
and i need to get only the 'request' portion.
My regex is :([^\r\n]+)(?:\-\-color\s+\#[0-9A-Za-z]+) and the regex generated by Jison is /^(?:([^\r\n]+)(?:--color\s+#[0-9A-Za-z]+))/
Am i missing something here? I've already readed the Deviations From Flex Bison topic.
Metadata
Metadata
Assignees
Labels
No labels