Var val="CREATE TABLE ` inversion_recharge ` ( ` ID ` bigint (20) NOT NULL AUTO_INCREMENT, ` orderno ` char (15) NOT NULL DEFAULT 'COMMENT' number ', ` itemcount ` tinyint (4) NOT NULL DEFAULT '0' COMMENT 'prepaid phone number', ` itemmoney ` int (11), NOT NULL DEFAULT '0' COMMENT 'total amount, ` type ` char (1) NOT NULL DEFAULT 'COMMENT' top-up type: 1 prefi lled 2 solid filling ', ` isall ` char (1) NOT NULL DEFAULT 'COMMENT' whether full: 1 than full 2 full ', ` remark ` varchar (200) NOT NULL DEFAULT 'COMMENT' remarks', ` reviewdate ` char (8) the NOT NULL DEFAULT 'COMMENT' audit date, ` reviewtime ` char (6) the NOT NULL DEFAULT 'COMMENT' audit time, ` status ` char (1) NOT NULL DEFAULT 'COMMENT' collection status: 1 NOT the receivable part 2 has the receivable collection ', ` reviewstatus ` char (1) NOT NULL DEFAULT '1' COMMENT 'approval status: 1 to 2 has passed 3 has refused to 4 have been withdrawn', ` datastatus ` char (1) NOT NULL DEFAULT '1' COMMENT 'data state 0/1 disabled enable' ` createuser ` bigint (20) NOT NULL DEFAULT '0' COMMENT 'founder, ` createdate ` char (8) the NOT NULL DEFAULT 'COMMENT' creation date, ` createtime ` char (6) the NOT NULL DEFAULT 'COMMENT' creation time, ` updateuser ` bigint (20) NOT NULL DEFAULT '0' COMMENT 'update people', ` updatedate ` char (8) the NOT NULL DEFAULT 'COMMENT' updated ' ` updatetime ` char (6) the NOT NULL DEFAULT 'COMMENT' update time, ` syscreatetime ` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'record creation time, ` sysupdatetime ` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'record last UPDATE time, The PRIMARY KEY (` ID `) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='generation top-up' ";
Var res=val. Match (/\ ` [\ w_] + \ ` \ s + [\ w_ \] (\) + (+ | \ \ s,)/g);
Now the result is like this:
Hope the contents of the array after each element behind keep up with the COMMENT! The second element, for example, hope is like this: ` orderno ` char (15)//order Pay attention to the space attention to Spaces note space
CodePudding user response:
\ '[\ u4e00 - \ u9fa50-9 \ \ s:] + \' This can be matched to the contents of the comment after