On Jun 20, 2006, at 2:20 AM, Massimo Valle wrote:
On 20/giu/06, at 00:41, Guyren Howe wrote:
On Jun 19, 2006, at 4:54 PM, Massimo Valle wrote:
I have a console application requiring a complex mix of command
line options, therefore I fell in the problem of advanced command
line parsing. To avoid reinventing the wheel I tried to search
something pre-built for RB but found nothing.
Is there someone that already solved the problem? and how?
The obvious answer is: GREP. All programmers should know how to
use grep, at least in a basic fashion. And if your command line
options are too complex for basic grep, you should almost
certainly rethink them.
using grep it's an interesting idea, however I would avoid to open
a shell from my application to invoke grep.
A better solution of grep would be calling getopt() via a declare
which is standard in libc. But again this is something external and
only available to Mac OS X and Linux.
I'd prefer to have something written in RB and possibly cross-
platform.
I meant regex. Your diy solution will almost certainly be doable
using a suitable regular expression.
Guyren G Howe
guyren-at-relevantlogic.com
http://relevantlogic.com
REALbasic, PHP, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>