• Login
Community
  • Login

Replace Comma Before & After All 13 Digit Numbers

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 995 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.
  • B
    BecauseICanTBH
    last edited by Feb 25, 2019, 4:29 AM

    I am looking to replace the comma after all 13 digit numbers in a document.

    Example:
    ,1490998078635,

    End Goal:
    |1490998078635|

    How exactly would I do that in the find & replace tool?

    1 Reply Last reply Reply Quote 0
    • T
      Terry R
      last edited by Feb 25, 2019, 6:10 AM

      @BecauseICanTBH
      I note you said replace the comma AFTER all 13 digits (in the post), yet the example you provided suggested you want to change the comma BOTH before and after as per the post heading.
      If there are exactly 13 digits everytime then the following Replace solution should suffice.
      Find What:,(\d{13}),
      Replace With:\|\1\|
      This is a regular expression so the Replace settings must be search mode ‘regular expression’ and have the ‘wrap around’ ticked.

      Give it a go and get back to us if any issues.

      Terry

      1 Reply Last reply Reply Quote 3
      • B
        BecauseICanTBH
        last edited by Feb 25, 2019, 6:42 AM

        Worked! Thanks a lot!

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