Q:

Regex query to remove character(s) from lines that has a phrase

I'm trying to convert my DDL's from Oracle to Postgres but I'm having a problem with double quote characters. I want to remove double quotes from each and every line which contains "CREATE TABLE " phrase. For example I want this: CREATE TABLE "ILIKEMEMES" to be converted to this: CREATE TABLE ILIKEMEMES  but I don't want line ("ID" VARCHAR(255) to change either. I'm doing this on Notepad++ so Python scripts wouldn't be my first choice of solution.

A:

Try doing the following find and replace, in regex mode:
Find:    \bCREATE TABLE "(.*?)"
Replace: CREATE TABLE $1

This will target only create table statements having a table name which appears in double quotes.

