RE: reg ex problem
- From: "Wagner, David --- Senior Programmer Analyst --- WGO"
- Date: Tue, 27 Jun 2006 13:35:34 -0700
Ryan Moszynski wrote:
i have this string extracted from a text file i'm writing a programif ( /=\s*([\d\.]+)/ ) {
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 instead of killing all non digit characters, it will kill all
non digit characters except for the period.
How do i do this?
$MyNbr = $1;
}
if always with a ; then
if ( /=\s*([^;\s]+)/ ) {
$MyNbr = $1;
}
The first one would be my choice, but just a thought.
thanks, ryan
Wags ;)
WGO: x2224
**********************************************************************
This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited.
**********************************************************************
.
- Prev by Date: reg ex problem
- Next by Date: Windows XP ppm and perldoc problems
- Previous by thread: Re: reg ex problem
- Next by thread: Windows XP ppm and perldoc problems
- Index(es):
Relevant Pages
|