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