Denham Eva wrote:
Hello Gurus,
In a script I have a piece of code as such:-
************* snip**************
my $filedate =~ s/(\d+)//g;
Try this instead:
my $filedate;
if( $var_with_file_name =~ m/(\d+)\.csv$/ ) {
$filedate = $1;
}
print "$filename\n";
************* snip end *******
The data I am parsing looks as such :-
********** DATA ************
C:/directory/MSISExport_20040814.csv
C:/directory/MSISExport_20040813.csv
.
.
.
.
C:/directory/MSISExport_20030501.csv
********** DATA end *********
Now I am actually trying to dump everything except the date or numerals
as such :- 20040814
Can someone help me with that regex? I am having a frustrating time of
it!
Much appreciated
Denham
--
Flemming Greve Skovengaard Man still has one belief,
a.k.a Greven, TuxPower One decree that stands alone
<[EMAIL PROTECTED]> The laying down of arms
4112.38 BogoMIPS Is like cancer to their bones
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>