Interesting requirements! :) Anyway, have you tried using regex? I played around a bit in my regex plugin for IntelliJ IDEA and a simple regex like:
"\\w+|\"(.+)\"|'(.+)'" worked for some simple tests that I tried. You would probably have to tweak it a bit. On Thu, Apr 3, 2008 at 11:48 AM, Daniel Tripp <[EMAIL PROTECTED]> wrote: > Well, pass it to Runtime.exec(), yes. > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of James Carman > > Sent: April 3, 2008 10:42 AM > To: Jakarta Commons Users List > Subject: Re: [cli] method to convert a string (which is a whole command > line) into an array (of arguments) > > > > So, are you looking to have your user enter a command line and then you're > going to split it yourself and pass that to a static main(String[] args) > method? > > On Thu, Apr 3, 2008 at 11:38 AM, Daniel Tripp <[EMAIL PROTECTED]> > wrote: > > > Which OS(es) are you targetting? > > > > Various Windowses, various *nixes. > > > > > > > So are you looking to emulate that? > > > > Right. > > > > > > > In which case, perhaps the Harmony project has some code that will > > do what you want. > > > > I can't see anything in Harmony that does this, because Harmony just > > implements the standard java.* etc. classes, correct? > > > > Environment variables are another consideration, yes. > > > > Really I was expecting other people to have run into this same > > problem too, and hoping they would chime in. I guess not. > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
