How to remove the first or last number in brackets in Notepad++

- Open the file you want to modify in Notepad++.
- Press Ctrl + H to open the Find and Replace window.
- In the Find and Replace window, select the Replace tab.
- In the Find what: field, enter the following regular expression:
\((\d+),\s*(\d+,\s*\d+)\)
(\2)
Example:
Before:
(728, 445, 977)
(123, 456, 789)
After:
(445, 977)
(456, 789)
Remove the last number in brackets
\((\d+,\s*\d+),\s*\d+\)
(\1)
In this way, you can remove the first or last number in brackets for all occurrences in your document using Notepad++ and regular expressions.