int数组正则替换为String数组

查找:

1
(\d+)(,|})

替换为:

1
"$1"$2

示例

要处理的文本

1
private String[] widthArr = {600, 540, 500, 480, 420, 360, 350, 340};

替换之后:

1
private String[] widthArr = {"600", "540", "500", "480", "420", "360", "350", "340"};