MelaOS has asked for the wisdom of the Perl Monks concerning the following question:
I'm a total newb to perl and regex and is having a hard time with the work that i'm currently doing.
i have a input file with stuff like below where i have to extract out the test name and the value in the middle along with it's unit.
So for the example shown below, i would need to extract out abc, 450.98mV, bcd 50.70dB and are 50.00dB.
I have been racking my brain trying to find a way to differentiate between those with just two units but have no idea how to make it so i can pull just the middle value.
Anyone has any suggestions, regex or whatever concept that can do this?
605 abc xxx 410.00 mV < 450.98 mV < 490.00 mV 606 bcd yyy -46.50 dB < 50.70 dB 607 are zzz 50.00 dB < 58.48 dB
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to regex this one out?
by albert (Monk) on Jun 15, 2006 at 10:03 UTC | |
|
Re: How to regex this one out?
by perlsen (Chaplain) on Jun 15, 2006 at 10:01 UTC | |
by albert (Monk) on Jun 15, 2006 at 10:08 UTC | |
|
Re: How to regex this one out?
by Moron (Curate) on Jun 15, 2006 at 13:05 UTC |