1
我有一個像如何使用正則表達式
0||||0||||6567||||0
我想用空字符串 取代0字符串所以匹配0我有以下的正則表達式使用更換一組值設置爲空字符串串
(?:^(?<zero>0)\||\|(?<zero>0)\||\|(?<zero>0)$)
現在我想輸出
emptystring||||emptystring ||||6567||||emptystring
我有一個像如何使用正則表達式
0||||0||||6567||||0
我想用空字符串 取代0字符串所以匹配0我有以下的正則表達式使用更換一組值設置爲空字符串串
(?:^(?<zero>0)\||\|(?<zero>0)\||\|(?<zero>0)$)
現在我想輸出
emptystring||||emptystring ||||6567||||emptystring
['\ B0 \ B'通過更換' ''']( https://regex101.com/r/kZ9oP4/1) – Tushar
不是每個數字都是0 –
@PriteshChhunchha你嘗試過嗎? –