thanks for the help, that did the trick
On 6/27/06, Ryan Moszynski <[EMAIL PROTECTED]> wrote:
i have this string extracted from a text file i'm writing a program to process:
test_freq = 1.0001;
and i have to extract the "1.0001"
i can't count on the whitspace being where it now is.
I wo
Ryan Moszynski wrote:
i have this string extracted from a text file i'm writing a program to
process:
test_freq = 1.0001;
and i have to extract the "1.0001"
i can't count on the whitspace being where it now is.
I would like to change this line of perl
$getTestFRQ =~ s/\D+//g;
so that
"Ryan Moszynski" schreef:
> i have this string extracted from a text file i'm writing a program
> to process:
>
> test_freq = 1.0001;
>
> and i have to extract the "1.0001"
>
> i can't count on the whitspace being where it now is.
>
> I would like to change this line of perl
>
> $getTestFRQ =
Here's one example of how you could go about it:
##
use strict;
use warnings;
my $testString = " test_freq = 1.0001;";
print "Test One: ";
if($testString =~ /=\s*([0-9.]+)\s*;\s*$/){
print $1;
}else{
print "Failed!";
}
print "\n";
##
Ryan Moszynski wrote:
> i have this string extracted from a text file i'm writing a program
> to process:
>
> test_freq = 1.0001;
>
> and i have to extract the "1.0001"
>
> i can't count on the whitspace being where it now is.
>
> I would like to change this line of perl
>
> $getTestFRQ