Community
    • Login

    How to delete characters after certain number

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 537 Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          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

          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
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors