I'm trying to get only 2 commas matched after a specific word match
this is a test, fun(a, b, fun(a, b, another(a, b, c))) another(a, ,a, ,)
I need it return only 4 commas (inside fun
not another
) matched instead all 11
/fun*(,)/ // I need to write it correct
I need to write this regex for a parser using http://zaa.ch/jison/try/ see the ignore regex mentioned
/* lexical grammar */
%lex
%%
\s+ /* skip whitespace */
([fun])*(,) /* I need to skip this here */
[0-9]+("."[0-9]+)?\b return 'NUMBER'
see the below