On Monday, December 17, 2018 at 1:54:16 AM UTC-8,
hss...@googlemail.com wrote:
>
> Why is "make_cont" (with line2 as input) not filled with the submatch "a"?
> Or are "make_cont" and "lib_cont" only assigned when all matches are in place? How can I match "as much as possible"?
Your pattern specifies that MAKE is followed by LIB (plus a few other constraints), and so if there is no match, then there is no sub-expressions to capture.
If you want to capture what follows MAKE= without requiring that LIB follows, then match only that part, and use a second regexp command to match and capture what follows LIB=.