gpt4 book ai didi

java - 如何获取字符串中括号 ([ ]) 之间的数字

转载 作者:行者123 更新时间:2023-12-01 17:05:30 25 4
gpt4 key购买 nike

我有一个像这样的字符串:

String msg = "[05] [06] [07] [08] [09] [10] [11] [12] [13] [14] [15] [16]";

我需要获取数组中括号之间的数字。有人可以帮助我吗?

最佳答案

伪代码:

String replace '[' with ''
String replace ']' with ''
String split at ' '

关于java - 如何获取字符串中括号 ([ ]) 之间的数字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25766158/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com