perl regex

David A. Sinck plug-discuss@lists.plug.phoenix.az.us
Wed, 26 Mar 2003 14:05:43 -0700


\_ 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