我有一個xml文件,需要在某些字段上有60個字符的限制。搜索/替換記事本++字符數限制
例
<Description>This is a long description that is really over 60 characters long and needs to be shortened</Description>
我需要修剪每個出現所以它只有60個字符,因此輸出對上述那樣。
<Description>This is a long description that is really over 60 characters</Description>
使用notepad ++如何使用Regex進行搜索和替換?
我有多個文件,我需要運行這個對每個文件大約有2000行,並有大約10-15次出現這個領域。
並非所有的字段都有超過60個字符,其中只有一些字符。數據
<Product>
<SuppliersProductCode>PF01215</SuppliersProductCode>
<BuyersProductCode></BuyersProductCode>
<GTIN>0</GTIN>
<Description>This is a long description that is really over 60 characters long and needs to be shortened</Description>
<Properties>
<Quantity UOMCode="EA">
<Packsize>1</Packsize>
<Amount>1</Amount>
</Quantity>
</Properties>
</Product>
感謝
很新的使用正則表達式,所以沒有嘗試很多設法找到()(。*)( Description>)位的權利,但無法找出替代。 –
Mark
2012-08-08 14:58:26