å¦æä¸ä¼éå¤çè¯
String s = "afhakhfakshfka_key_adasfasfa" ç®æ å符串ï¼KEYå°±ç¨"key"
int index = s.indexOf("key") è·ååºç°keyå符串ç第ä¸ä¸ªä½ç½®ï¼è¿éè¦ä¿è¯åé¢æ²¡æè·KEYéå¤
String left = s.substring(index) æªåKEYåºç°ä½ç½®åé¢çå符串
String right = s.sbustring(index+3) åé¢çåç¬¦ä¸²ï¼ +3 æ¯keyçé¿åº¦ä¸º3 (KEYçå¼é¿åº¦)
String[] strs = str.split(Pattern.quote("ä½ æå®çå符"));
温馨提示:答案为网友推荐,仅供参考