Copy and store the contents in parentheses with Notepad++

Solution 1:

Try this for the match:

^.*\((\d+)\)$

And replace with:

$1

This works because:

  1. Match from the beginning of the line with ^
  2. Match everything until a paren .*\(, the paren is escaped because it is special
  3. Use a group () to match some text and save for later.
  4. Match one or more digits \d+
  5. The digits are followed by a close paren \)
  6. ... which is at the end of the line $

Then the replacement $1 is the first group match in the regex, everything inside of the un-escaped parens.