I am trying to do a find and replace in Notepad++ I have a file that has an open bracket a number and a comma I want to replace the number leaving the value null Ex: Find: "(32," Repalce with: "(''," The numbers range from two to four digits. I have done it before in BBEdit, but do not have access to it on this computer. can I do this in Notepad++? Thanks

  • Do you want the number replace with 2 single quotes? – MacAnthony Jul 23 '12 at 20:49

I used this to get it to work. This assumes that something other than a digit will follow the replaced number (like a comma or a space).

Find what:


Replace with:

| improve this answer | |
  • His question indicated that he needs the range of numbers to be between 2 and 4, which this solution does not account for. – Matt Ramey Jul 23 '12 at 21:05
  • Actually, he said that the numbers range from 2 to 4 but not that there may be values out of that range that shouldn't match. If all the numbers are between 2-4 and he wants to do this to all of them, then this still meets that need. – MacAnthony Jul 23 '12 at 21:08
  • @MattRamey If that's truly a need, then yours is better. I'm only offering this as this is an easier solution to remember. – MacAnthony Jul 23 '12 at 21:10

You're going to want to use the following regex for the search term:


And select "regular expression" option.

| improve this answer | |
  • I tried this first but I couldn't get notepad++ to work with a range modifier. Which version of notepad++ is this? I may have an outdated version. – MacAnthony Jul 23 '12 at 21:12
  • Notepad++ recently added regex range modifiers. I'm not sure of the exact version, but my current version of 6.15 is working with it. – Matt Ramey Jul 23 '12 at 22:01
  • Yes, my version was 5.8.2 so this solution may be very version dependent. I should probably update it. – MacAnthony Jul 24 '12 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.