我想找到并替换以下
rice', ' 36,650', 'https://s
va', ' 3,650', 'https://s
rat', ' 332,650', 'https://s
fe', ' 34,650', 'https://s
rfce', ' 13,650', 'https://s
aace', ' 53,650', 'https://s
到
rice', '36650', 'https://s
va', '3650', 'https://s
rat', '332650', 'https://s
fe', '34,650', 'https://s
rfce', '13650', 'https://s
aace', '53650', 'https://s
从数字开头删除一个逗号和空格
更新
这不适用于此
(9, 'M-MG1', 'httion', 'Buyice', ' 3,650', 'https://', 4, 'February 22, 2016', 0, 0, 0, 0, 0, 1),
答案 0 :(得分:1)
搜索select
CASE WHEN GROUPING(case when ChargeAmount=0 then 'Cash' else 'Charge' end) = 1 THEN 'Total' ELSE case when ChargeAmount=0 then 'Cash' else 'Charge' end END as 'TxType',
TaxRate,
sum(Subtotal) as 'SubTotal',
sum(TaxableAmount) as 'TaxAmt',
sum(AmountTendered) as 'Tendered',
sum(ChangeAmount) as 'Change',
sum(ChargeAmount) as 'Charged',
sum(Total) as 'Total'
from jp2Invoice
group by case when ChargeAmount=0 then 'Cash' else 'Charge' end,
TaxRate WITH ROLLUP
ORDER BY case when ChargeAmount=0 then 'Cash' else 'Charge' end
,替换为' (\d+),(\d+)'
。
说明:
'\1\2'
是一个数字\d
是一个或多个数字。它将匹配尽可能多的数字。\d+
是一个包含一个或多个数字的组(\d+)
和\1
是反向引用:它们引用先前定义的组答案 1 :(得分:0)
您可以尝试使用' ([0-9]+),([0-9]+)'
\1\2