Hello mavericknik,
I think you’re looking for something like this:
#! perl use strict; use warnings; while (<DATA>) { print "$1.$2\n" if m{ ^ \s* Pin: \s* ([^.]*?) \. (\S*) (?: \s+ out +)? $ }x; } __DATA__ Pin: U343.IN1 in Pin: U713.INP out Pin: U714.QN
Output:
18:14 >perl 1318_SoPW.pl U713.INP U714.QN 18:14 >
Update: Some notes:
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Help with a regex
by Athanasius
in thread Help with a regex
by mavericknik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |