perl regex

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: David A. Sinck
日付:  
題目: 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