Community
    • Login

    Help with regex

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 984 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.
    • C Ananda RaoC
      C Ananda Rao
      last edited by

      Dear Folks,
      I am an absolute newbie. The reason I happened to land here is because I inherited a 15000 row excel address book in which the entries were all made without any sort of rules or regulations. I tried various youtube tutorials in excel, but could not get anywhere. There are nearly 2000 odd lines which begin with door numbers entered as 12-45-1, 132-3-9 and 6-18-992 etc., I want to add a hash symbol(#) to the beginning of all these lines that start with digits. I need to do this because if I use tools in excel, all these numbers get converted into crazy dates. So I copied the column into notepad++ and would like to accomplish the same thing.

      Could somebody help me with the correct regex to get this done? Thanks for your time.

      1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones
        last edited by

        You can find regex documentation by starting in the FAQ

        Taking you at your literal word, that any line that starts with a digit should get a hashmark before it:

        Find What : ^\d+
        Replace With : #$0
        Search Mode : ☑ Regular Expression

        C Ananda RaoC 1 Reply Last reply Reply Quote 2
        • C Ananda RaoC
          C Ananda Rao @PeterJones
          last edited by

          @PeterJones Thank you so much! It worked!

          I went through the FAQ. But the whole regex thing looked so frightening that I decided to depend upon the kindness of strangers. Not being a programmer, I felt that it would take me at least a couple of months just to get an idea about it.

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