0
在使用Java字符串出現的任何數字前後添加星號的最佳方法是什麼?請注意,顯示加入的多個數字將被解釋爲單個數字。使用Java在字符串中插入星號數字
例如,轉換這樣的:
0this 1is02 an example33 string44
這樣:
*0*this *1*is*02* an example*33* string*44*
在使用Java字符串出現的任何數字前後添加星號的最佳方法是什麼?請注意,顯示加入的多個數字將被解釋爲單個數字。使用Java在字符串中插入星號數字
例如,轉換這樣的:
0this 1is02 an example33 string44
這樣:
*0*this *1*is*02* an example*33* string*44*
使用正則表達式替換後引用。 –