lpanokarren has asked for the wisdom of the Perl Monks concerning the following question:
E.g. x='Disk - HD 500GB 2.5 SATA (00X3Y)'
echo $x | sed "s/^[^0-9]*\([0-9]*[.]*[0-9]*\)[^0-9A-Z]*GB.*/\1/g"
echo $x | sed "s/^[^0-9]*\([0-9]*[.]*[0-9]*\)[^0-9A-Z]*GB.*/\1/g"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex help!
by LanX (Saint) on Jun 07, 2013 at 22:03 UTC | |
by lpanokarren (Novice) on Jun 08, 2013 at 01:05 UTC | |
by LanX (Saint) on Jun 08, 2013 at 03:03 UTC | |
by lpanokarren (Novice) on Jun 10, 2013 at 01:04 UTC | |
by Anonymous Monk on Jun 10, 2013 at 01:35 UTC | |
by Anonymous Monk on Jun 08, 2013 at 01:45 UTC | |
|
Re: Regex help! (OT)
by LanX (Saint) on Jun 07, 2013 at 21:40 UTC | |
|
Re: Regex help!
by shmem (Chancellor) on Jun 09, 2013 at 08:33 UTC | |
|
Re: Regex help!
by lpanokarren (Novice) on Jun 07, 2013 at 21:44 UTC |