Remove text part in script with regular expression in Notepad++

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

capture2

Works with tablespace clause on indices as well

One thought on “Remove text part in script with regular expression in Notepad++

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.