Re: reg ex problem



thanks for the help, that did the trick

On 6/27/06, Ryan Moszynski <ryan.m.lists@xxxxxxxxx> 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 instead of killing all non digit characters, it will kill all
non digit characters except for the period.

How do i do this?

thanks, ryan

.



Relevant Pages

  • RE: reg ex problem
    ... Ryan Moszynski wrote: ... and i have to extract the "1.0001" ... i can't count on the whitspace being where it now is. ... so that instead of killing all non digit characters, ...
    (perl.beginners)
  • Re: reg ex problem
    ... Ryan Moszynski wrote: ... and i have to extract the "1.0001" ... i can't count on the whitspace being where it now is. ... so that instead of killing all non digit characters, ...
    (perl.beginners)
  • Re: reg ex problem
    ... "Ryan Moszynski" schreef: ... and i have to extract the "1.0001" ... i can't count on the whitspace being where it now is. ... so that instead of killing all non digit characters, ...
    (perl.beginners)