Search code examples
regexnotepad++notepad

how to add space between two numbers


I have a huge number

37107287533902102798797998220837590246510135740250 46376937677490009712648124896970078050417018260538 74324986199524741059474233309513058123726617309629 91942213363574161572522430563301811072406154908250 23067588207539346171171980310421047513778063246676 89261670696623633820136378418383684178734361726757 28112879812849979408065481931592621691275889832738

Actually the number is quite bigger than that.

How do I put space between two numbers? How do I represent the same element + 'space' to be replaced in notepad?


Solution

  • You can replace (\d) with \1 {pretend this is a space}.

    \d matches a single digit. \1 refers to the first capturing group, which contains that digit.