Help with regex



  • 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.



  • 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



  • @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.


Log in to reply