发表于 2023-07-04 Waline: 本文字数: 305 阅读时长 ≈ 1 分钟 int数组正则替换为String数组查找: 1(\d+)(,|}) 替换为: 1"$1"$2 示例要处理的文本 1private String[] widthArr = {600, 540, 500, 480, 420, 360, 350, 340}; 替换之后: 1private String[] widthArr = {"600", "540", "500", "480", "420", "360", "350", "340"};