Hi TonyNY,
NetWallah gave you already an excellent answer, additionally here are some links that you may want to check out:
Official docs:
https://perldoc.perl.org/perlre.html#Capture-groups
https://perldoc.perl.org/perlretut.html#Named-backreferences
A bit 'easier' explanations to start with and a cheat-sheet:
https://perlmaven.com/how-to-extract-strings-from-a-file
https://perlmaven.com/regex-cheat-sheet
In reply to Re: Print word from text file that is not an exact match
by Veltro
in thread Print word from text file that is not an exact match
by TonyNY
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |