in reply to A nice little question for the insane
Seriously, parsing something that has balanced anythings with regular expressions is notoriously hard to get right, especially if you want to be able to report back exactly where your user went wrong. They're more of a yes-or-no kind of deal.
If you want to parse a command line, it's better to use an actual parsing routine. The one in tilly's Text::xSV should be very close to what you're looking for. Actually, you could probably use Text::xSV with some very slight modifications. Well, one modification - you need to be able to specify the SEP as a regex of \s+.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A nice little question for the insane
by jdporter (Paladin) on Apr 06, 2005 at 03:51 UTC | |
by crenz (Priest) on Apr 06, 2005 at 09:57 UTC | |
by Anonymous Monk on Apr 06, 2005 at 11:25 UTC | |
by crenz (Priest) on Apr 06, 2005 at 11:37 UTC | |
|
Re^2: A nice little question for the insane
by kelan (Deacon) on Apr 06, 2005 at 12:48 UTC |