Pin: U343.IN1 in Pin: U713.INP out Pin: U714.QN #### /^[ ]+Pin:[ ]*([^\.]*)\.([^ ]*)$/ --> Matches " Pin: U714.QN" $1 = U714 $2 = QN and /^[ ]+Pin:[ ]*([^\.]*)\.([^ ]*)[ ]out/ --> Matches " Pin: U713.INP out" $1 = U713 $2 = INP #### ^[ ]+Pin:[ ]*([^\.]*)\.([^ ]*)$|^[ ]+Pin:[ ]*([^\.]*)\.([^ ]*)[ ]out #### Pin: U713.INP"endofstring or out" With $1 = U713 $2 = INP