in reply to Substitutions Within Substitutions
$_ = do {local $/=undef; <DATA>}; s/ (sometype\(\d+\)|sometype)(?!.*?(not )?null\b.*?)/ $1 NOT NULL/mgi; print; __DATA__ create table foo ( somevar1 sometype, somevar2 sometype null, somevar3 sometype not null, somevar4 sometype(20), somevar5 sometype(20) null, somevar6 sometype(10)) ;
|
|---|