There are several possibilities to do that. Here are described two possibilities.
There can be executed a Perl regular expression Replace all with the search expression ^(?!<RX).*(?:\r\n|$) and use as replace string either just \r\n to just change the lines not starting with <RX to an empty line or an empty replace string to delete all lines not starting with <RX.
There can be run with Unix or Perl regular expression engine a Find with search expression ^<RX or with UltraEdit regular expression a Find with search expression %<RX and check the advanced option Filter lines with selection of Show to get shown just the lines starting with <RX and use next on ribbon tab Edit in first group Select and delete from popup menu of third item Delete the command Delete all hidden lines.
Best regards from an UC/UE/UES for Windows user from Austria