老千进来-->静夜思转移
JAVA脚本中有没有split这样的分割函数?就是"2007-03-28"这样的字符串,经过用"-"分割处理变成
2007,03,28组成的数组?
我知道VB里有,会用VB的,不会用JAVA的,印象中JAVA分割的还要带着分割符
public String[] split(String regex)
This method works as if by invoking the two-argument split
method with the given expression and a limit argument of zero. Trailing empty strings are therefore not included in the resulting array.
The string "boo:and:foo", for example, yields the following results with these expressions:
Regex Result : { "boo", "and", "foo" } o { "b", "", ":and:f" }
regex
- the delimiting regular expression
PatternSyntaxException
- if the regular expression's syntax is invalid
Pattern