Community
    • Login

    How to delete characters after certain number

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 151 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Cristina MoiseC
      Cristina Moise
      last edited by

      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

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Cristina Moise
        last edited by Alan Kilborn

        @Cristina-Moise :

        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>

        Cristina MoiseC 1 Reply Last reply Reply Quote 3
        • Cristina MoiseC
          Cristina Moise @Alan Kilborn
          last edited by

          @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.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors