Above could not possibly "print[s] the whole line" for "MODULE " will be missing. As you are capturing any- & everything after "MODULE " with "(.*)", so you would get "C17 (N...)" string. Capture what you actually want.
Surely there must be some other patterns besides one specific case? What are they?
In this specific case, try ...
m{ \b (MODULE \s+ [A-Z]+[0-9]+) \s* [(] .+? [)] }x
In reply to Re: Pattern matching
by parv
in thread Pattern matching
by nursyza
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |