How about something like this?
$_ =~ /([0-9A-F]{4}\.[0-9A-F]{4}\.[0-9A-F]{4}\.[0-9A-F]{4})/i $mac = $1; #matches four sets of 4 characters between 0 and 9 or A and F separated by periods -----Original Message----- From: Tucker, Ernie To: [EMAIL PROTECTED] Sent: 7/31/02 9:26 PM Subject: Need to extract just the mac id I have a file with the following data in it. What I am trying to do is just grab the mac id. Is there a good way to do this in perl. I tried to grep on just 00 but that gave me more info than what I need. Thanks for any help. 0008.0e39.ad80 Account: 10391-xxxxx Name: glusick, dave Status: scheduled Install Date: 2002-06-03 Address: 850 xxxxxx, sun prarie, wi 53590 Phone: (608) xxx-xxxx Headend: athome Node: ================================================== 0004.bdca.04a0 Account: 10391-xxxxx Name: NUNN, ROBBIE Status: scheduled Install Date: 2002-06-03 Address: 1106 N xxxxx, SUN PRAIRIE, WI 53590 Phone: (608) xxx-xxxx Headend: athome Node: Ernest P. Tucker II Network Technician Madison Management Area Charter Communications "The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]