How to delete characters after certain number
-
Hi All,
I would appreciate your help regarding my issue. I am struggling with a big xml File where I have below line, the commodity code should have only 8 characters but due to a system wrong setting it’s coming out with 10 numbers/characters so I manually have to replace each code by deleting the last two numbers and it takes me almost two days to do that.
Can someone help me with this topic.
<ProductCommodityCode>8414302090</ProductCommodityCode>Thank you
-
Find:
(?-i)<ProductCommodityCode>(\d{8})\d\d</ProductCommodityCode>
Replace:<ProductCommodityCode>${1}</ProductCommodityCode>
Search mode: Regular expression
Will change, e.g.
<ProductCommodityCode>8414302090</ProductCommodityCode>into
<ProductCommodityCode>84143020</ProductCommodityCode> -
@Alan-Kilborn Can’t say in words how much I love you right now.You made my day !! So happy!Again thank you for your prompt answer.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login