Regex background within the group with OR


Hello guys, I am trying to reference a value in an example OR, I have the text in the file:

CREATE TABLE ABC;
ALTER TABLE ABC;

I need the ALTER ABC (table name) to always be the same as CREATE. I tried the following expression, but to no avail.

(CREATE s + TABLE s + ( w +). +; | ALTER s + TABLE s + 2. +;))