Community
    • Login

    Help with regex

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 1.3k Views 2 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.
    • C Ananda RaoC Offline
      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 Offline
        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 Offline
          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

          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