When dealing with Oracle create table scripts, sometimes it’s useful to remove the ‘tablespace USERS…’ part from the script. Using a regular expression (in Notepad++) it’s easy.
Find what: tablespace.*?;
Replace with: ;
Wrap around: checked
Regular expression: checked
. matchesnewline: checked
Works with tablespace clause on indices as well
^(.*?)$\s+?^(?=.*^\1$)
to replace duplicate lines (leave ‘Replace with’ empty, enbale ‘Match case’).