- or download this
$line =~ m/(.*?)(\d+\/\d+\/\d+)?\s*(.*)/;
print "Input : $line";
print "Output \$1: -$1-\n";
print "Output \$2: -$2-\n";
print "Output \$3: -$3-\n\n";
- or download this
Input : 301 S. MAPLE STREET
Output $1: --
...
-utput $3: -09/09/2009 301 S. MAPLE STREET
- or download this
Input : 301 S. MAPLE STREET
Output $1: -000001-
...
Output $1: - -
Output $2: -09/09/2009-
-utput $3: -301 S. MAPLE STREET