notepad++ – Regex: delete all text except ‘SS’ followed by 4 to 8 characters

I have a long text file that looks like this:

Species: Sorbus subcuneata | Somerset Whitebeam Date: 2007-09-30
England OSGR: SS7448

Species: Sorbus subcuneata | Somerset Whitebeam Date: 2007-09-30
England OSGR: SS7448

Species: Sorbus subcuneata | Somerset Whitebeam Date: 2001-10-02
England OSGR: SS74394901

I’d like to extract only the ‘SS****’ strings (some have 4 digits, some have 6, some have 8).

I have searched the forums here for various explanations of regex but they all seem to be much more complicated scenarios, and I’m too much of a noob to reverse-engineer them to do something simple like this.

Thanks in advance for any tips!

Read more here: Source link