0 Members and 5 Guests are viewing this topic.
UPDATES: check my first post and re-download the JAR. It should also work with java 5
Quote from: Binder News on December 24, 2010, 01:56:29 pmUPDATES: check my first post and re-download the JAR. It should also work with java 5It's the only update? (working both in Java5 and Java 6?)
Pattern Splitter = Pattern.compile("(\"[^\"]*\"|[^\"][\\S]*)\\S?");Matcher m;int end = -1;int x = 0;String[] args = new String[100]; //Or whatever you think the max amount of arguments might bewhile (end + 1 < msg.length()) { (m = Splitter.matcher(msg)).find(end + 1); end = m.end(); args[x] = m.group(); x++;}
No, there are some other updates as well. Also, Graph, what environment var should be used for Mac?
If you still need the tokenizer thing... you could use regex Code: ("Java!") [Select]Pattern Splitter = Pattern.compile("(\"[^\"]*\"|[^\"][\\S]*)\\S?");Matcher m;int end = -1;int x = 0;String[] args = new String[100]; //Or whatever you think the max amount of arguments might bewhile (end + 1 < msg.length()) { (m = Splitter.matcher(msg)).find(end + 1); end = m.end(); args[x] = m.group(); x++;}
Thanks for all your ideas. Graphmastur, could you tell me what environment var I should substitute on Mac for the PATH var?Thx.