私はこのような文字列を持っています:
06%2F27%2F2012%2C07%2F05%2F2012%2C06%2F29%2F2012%2C07%2F05%2F2012%2C07%2F06%2F2012%2C07%2F19%2F2012%2C07%2F06%2F2012%2C07%2F19%2F2012%2C07%2F05%2F2012%2C07%2F05%2F2012%2C07%2F20%2F2012%2C07%2F20%2F2012%2C07%2F27%2F2012%2C08%2F02%2F2012%2C07%2F20%2F2012%2C07%2F26%2F2012%2C08%2F03%2F2012%2C08%2F06%2F2012%2C08%2F06%2F2012%2C08%2F17%2F2012
このように値を分割したい:
%2F should be /
%2C marks the starting of new string
したがって、値は次のようになります。
2012年6月27日、2012年5月7日など
このために何らかの正規表現を作成しようとしましたが、成功しませんでした。
私が試した例:
String phrase = "06%2F27%2F2012%2C07%2F05%2F2012%2C06%2F29%2F2012%2C07%2F05%2F2012%2C07%2F06%2F2012%2C07%2F19%2F2012%2C07%2F06%2F2012%2C07%2F19%2F2012%2C07%2F05%2F2012%2C07%2F05%2F2012%2C07%2F20%2F2012%2C07%2F20%2F2012%2C07%2F27%2F2012%2C08%2F02%2F2012%2C07%2F20%2F2012%2C07%2F26%2F2012%2C08%2F03%2F2012%2C08%2F06%2F2012%2C08%2F06%2F2012%2C08%2F17%2F2012";
String delims = "REGEX_GOES_HERE";
String[] tokens = phrase.split(delims);