(having read your question again, before publishing, I note that you are saying the LIKE line of the command line, therefore this information may not be useful to you, but as I wrote it, I will publish it in any case - please do not pay attention if I missed your question.)
If you clarify your question, I will try to help, but from the general comments that you made, I would say do not do this :-), you ask regexp to split the series of parmers into an array. Instead, I strongly recommend that you consider using getopt; there are versions of this library for most programming languages. Getopt will do what you ask and scale to manage the much more complex processing of arguments if you require it in the future.
If you tell me which language you use, I will try and send you a sample.
Here is an example of the source pages:
http://www.codeplex.com/getopt (.NET)
http://www.urbanophile.com/arenn/hacking/download.html (Java)
Sample (from java page above)
Getopt g = new Getopt("testprog", argv, "ab:c::d"); // int c; String arg; while ((c = g.getopt()) != -1) { switch(c) { case 'a': case 'd': System.out.print("You picked " + (char)c + "\n"); break; // case 'b': case 'c': arg = g.getOptarg(); System.out.print("You picked " + (char)c + " with an argument of " + ((arg != null) ? arg : "null") + "\n"); break; // case '?': break; // getopt() already printed an error // default: System.out.print("getopt() returned " + c + "\n"); } }
Scott James
source share