特定のフィールドに 60 文字の制限が必要な xml ファイルがあります。
例
<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 ++を使用して、正規表現を使用して検索と置換を行うにはどうすればよいですか?
各ファイルに対してこれを実行する必要がある複数のファイルがあり、約 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>
ありがとう