in reply to Help with a regex

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,

Replies are listed 'Best First'.
Re^2: Help with a regex
by mavericknik (Sexton) on Jul 24, 2015 at 08:26 UTC
    That is perfect. Thank you very much!