On Mon, Jun 08, 2015 at 02:49:44PM +0000, hru...@gmail.com wrote: > Otto Moerbeek <o...@drijf.net> wrote: > > > Tradiotionally, { } pattersn are not part of awk re's. > > > > Posix added them, but we do not include them afaik. Gnu awk only accepts > > them if given an extra arg (--posix or --re-interval). > > > > I think this should be documented. > > Although there is a clear theory about "regular expressions", I have the > impression that there is no standard syntax. One needs to read again and > again the documentation of programs that use them. > > I am just missing a way to reference in a (f)lex action a previously > matched subexpression (like with \m in a substitution with ed). > > Why is this? Because lex is so old? And what does people do in these > cases? > > Rodrigo
Refering to subpatterns is not available in flex. I suppose it is not available since it would require a more complex re engine. Interpretation of the lexical value should be "hand-crafted". -Otto