perl regex

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: David A. Sinck
Date:  
Subject: perl regex

\_ SMTP quoth Trent Shipley on 3/26/2003 13:33 as having spake thusly:
\_
\_  [very well explained answer]
\_ 
\_ my $first_datum      = m/$first_separator
\_                                     [^:]
\_                                     $middle_separator
\_                                     /x;
\_ my $middle_datum  = m/$middle_separator
\_                                     [^:]
\_                                     $middle_separator
\_                                     /x;
\_ my $last_datum     = m/$middle_separator
\_                                     [^:]
\_                                     \Z
\_                                     /x;


The only gotcha is that this assumes that there are but three fields.

David