I combined ideas from both tips to come up with the following (semi-Perl) solution. Thanks for your help Paladin and allolex.
for %a in (*.txt) do @perl -ne "if (m/ (M[A-Z]{3}) /) { print qq($1\n); }" %a
In reply to Re: (2) One-liner for Matching a Regex in a Directory of Files
by svsingh
in thread One-liner for Matching a Regex in a Directory of Files
by svsingh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |