On Mon, Aug 13, 2012 at 5:42 AM, Owen wrote:
> I have a web form with a text area that I feed back through a cgi
> script and "filter" the text with;
>
> $q1_elaborate =~ s/[^[:alpha:]' .-]//g;
> quotemeta($q1_elaborate);
>
> However, it removes line feeds as well, so maybe that code is not al
[EMAIL PROTECTED] (Denham Eva) wrote in
news:[EMAIL PROTECTED]:
> Hello Gurus,
> In a script I have a piece of code as such:-
> * snip**
> my $filedate =~ s/(\d+)//g;
> * snip end ***
> The data I am parsing looks as such :-
> ** DATA
>
Denham Eva [DE], on Monday, September 6, 2004 at 14:41 (+0200) typed:
DE> my $filedate =~ s/(\d+)//g;
DE> ** DATA
DE> C:/directory/MSISExport_20040814.csv
DE> C:/directory/MSISExport_20040813.csv
DE> Can someone help me with that regex? I am having a frustrating time of
I hop
Jaffer Shaik wrote:
Try in this way. Just remove "my", you will get it.
What kind of stupid advice is that?
$filedate = "C:/directory/MSISExport_20040814.csv";
($filedate) =~ s/(\_\d+)//g;
Left aside that the parentheses are redundant, that does the opposite
of what the OP asked for.
--
Gunnar Hj
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 **
Hi,
Try in this way. Just remove "my", you will get it.
$filedate = "C:/directory/MSISExport_20040814.csv";
($filedate) =~ s/(\_\d+)//g;
print "$filedate\n";
Thank you
jaffer
-Original Message-
From: Denham Eva [mailto:[EMAIL PROTECTED]
Sent: Monday, September 06, 2004 6:11 PM
To: [EMAI