Q:

Remove all text except a certain string in Notepad++

I'm extracting case numbers from a wall of text.  How do I filter out all the useless text using the replace function in Notepad++ with the help of RegEx?  The parts I want to keep are made up of letters, digits, and a hyphen (SPP-1803-2045227). 
I would like to turn this...
(SPP-1803-2045227)Useless text goes here.  2019-05-18 *
(SPP-1915-1802667)More useless text.  2019-01-14 *
(SPP-1904-1012523)And some more.  2019-02-03 *

...into this:
SPP-1803-2045227
SPP-1915-1802667
SPP-1904-1012523

I've been playing around with RegEx and also found something in another thread on here before, which wasn't the solution but came very close.  Unfortunately I can't find it anymore.  It looked something like this:
^(?!S\w+).*\r?\n? 

Any help is appreciated. 

A:

you could try something like this. 
find: .*\((\w{3}-\d{4}-\d{7})\).* 
replace with: \1
The above Regular Expression matches the whole line with your letters and digits between an extra pair of parentheses. 
When you replace with \1 you keep only the match between parentheses. 
Remember to select Regular Expression Search mode.