in reply to Regular Expression Problem

This looks a bit like Oracle DDL...if it is you might want to consider altering your replacement text to something like:
...PRIMARY KEY (EL_ID) USING INDEX TABLESPACE INDEXES STORAGE (INITIAL ... NEXT ... MAXEXTENTS UNLIMITED PCTINCEASE 0)
(replacing the ...'s with appropriate values), so that you have your indexes in a seperate tablespace to your data.

rdfield

Replies are listed 'Best First'.
Re: Re: Regular Expression Problem
by curtisb (Monk) on Dec 02, 2002 at 16:09 UTC

    OK, I have this working for the most part. However, I have one question how do I get USING INDEX TABLESPACE INDEXES added after the closing )?

    s/(PRIMARY KEY)/CONSTRAINT PK_$table $1/;
    can anyone help.

    Thanks,

    Bobby

      s/(PRIMARY KEY\([^)]\))/CONSTRAINT PK_$table $1 USING INDEX TABLESPACE + INDEXES/;
      as long as you have the primary key columns defined within brackets after "PRIMARY KEY".

      rdfield