in reply to Help with a regex

I dunno if this fits your case, but I often prefer, in such cases, to start by removing the cases that I do not want using for example two regexes:
while (<DATA>) { next if /in\s*$/; print "$1.$2\n" if /^\s*Pin:\s+(\w+)\.(\w+)/; }