Find and replace everything between and including parentheses
-
I’m having some trouble with find and replace. I want to find and replace everything between and including parentheses. I have many instances of dollar amounts in between parentheses that I want to get rid of. I also have words between parentheses that I want to get rid of. Example: ($76,800), (N/A)
I select Search > Replace. In “Find What” I put:
( .+)In “Replace With” I put nothing.
I click “Replace All”. Notepad++ tells me that 0 occurrences were found. What am I doing wrong please?
-
Parenthesis have special meaning to regular expressions. You need to escape them (by putting
\in front of them). So your regex would look like:\(.+\)Also, for safety you probably want to do lazy matching:
\(.+?\) -
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