in reply to Re: A silly reg exp question
in thread A silly reg exp question
s/8/7-/g; s/7/33-/g; s/6/5-/g; s/5/22-/g; s/4/3-/g; s/3/11-/g; s/2/1-/ +g; s/1/-/g;
This version certainly seems to work, but is it lazy, crazy, peevish, peccant, or...?
I think it's the version I would choose if I hated the person who would be maintaining my code!
Update: ++ for the whole reply for diversity and perversity!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: A silly reg exp question
by JavaFan (Canon) on Jan 16, 2012 at 20:58 UTC | |
by AnomalousMonk (Archbishop) on Jan 17, 2012 at 01:05 UTC |