dragonchild has asked for the wisdom of the Perl Monks concerning the following question:
So, I went to /^\s*([+-]?(?:\d+)?(?:\.)?(?:\d+)?)\s*([a-z][a-z]?)\s*$/i, but I know that this will give me false positives. (For example, '.c' will work match just fine.)
Thus, I put it out to the monastery.
(Oh, to make it more fun, I have to use 5.005_003. I can't use anything cool like :alpha.)
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
update (broquaint): added missing </code> tag
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Identifying and parsing numbers
by Abigail-II (Bishop) on Jan 15, 2003 at 23:16 UTC | |
|
Re: Identifying and parsing numbers
by mojotoad (Monsignor) on Jan 15, 2003 at 23:09 UTC | |
|
Re: Identifying and parsing numbers
by bart (Canon) on Jan 16, 2003 at 03:19 UTC | |
|
Re: Identifying and parsing numbers
by Gilimanjaro (Hermit) on Jan 16, 2003 at 12:46 UTC | |
|
Re: Identifying and parsing numbers
by tekkie (Beadle) on Jan 16, 2003 at 17:39 UTC | |
by Anonymous Monk on Jan 16, 2003 at 23:34 UTC | |
by Gilimanjaro (Hermit) on Jan 16, 2003 at 23:53 UTC | |
by tekkie (Beadle) on Jan 17, 2003 at 14:37 UTC | |
|
Re: Identifying and parsing numbers (KISS)
by tye (Sage) on Jan 16, 2003 at 23:10 UTC |