github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/function/func_regular_like.result (about) 1 SELECT REGEXP_LIKE('Cat', '.*') Result; 2 result 3 true 4 SELECT REGEXP_LIKE('Cat', 'b+') Result; 5 result 6 false 7 SELECT REGEXP_LIKE('Cat', '^Ca') Result; 8 result 9 true 10 SELECT REGEXP_LIKE('Cat', '^Da') Result; 11 result 12 false 13 SELECT REGEXP_LIKE(NULL, '.*'); 14 regexp_like(null, .*) 15 NULL 16 SELECT REGEXP_LIKE('Cat', NULL); 17 regexp_like(Cat, null) 18 NULL 19 SELECT REGEXP_LIKE(NULL, NULL); 20 regexp_like(null, null) 21 NULL 22 drop table if exists t1; 23 create table t1(a int, b varchar(100)); 24 insert into t1 values(1 , "PowerSlave"); 25 insert into t1 values(2 , "Powerage"); 26 insert into t1 values( 3 , "Singing Down the Lane" ); 27 insert into t1 values(4 , "Ziltoid the Omniscient"); 28 insert into t1 values(5 , "Casualties of Cool"); 29 insert into t1 values( 6 , "Epicloud"); 30 insert into t1 values(7 , "Somewhere in Time"); 31 insert into t1 values(8 , "Piece of Mind"); 32 insert into t1 values( 9 , "Killers"); 33 insert into t1 values(10 , "No Prayer for the Dying"); 34 insert into t1 values(11 , "No Sound Without Silence"); 35 insert into t1 values(12 , "Big Swing Face"); 36 insert into t1 values(13 , "Blue Night"); 37 insert into t1 values(14 , "Eternity"); 38 insert into t1 values(15 , "Scandinavia"); 39 insert into t1 values(16 , "Long Lost Suitcase"); 40 insert into t1 values(17 , "Praise and Blame"); 41 insert into t1 values(18 , "Along Came Jones"); 42 insert into t1 values(19 , "All Night Wrong"); 43 insert into t1 values(20 , "The Sixteen Men of Tain"); 44 SELECT a, b 45 FROM t1 46 WHERE REGEXP_LIKE(b, '^Power'); 47 a b 48 1 PowerSlave 49 2 Powerage 50 drop table t1; 51 create table t1(a int, b varchar(100)); 52 insert into t1 values(1 , "PowerSlave"); 53 insert into t1 values(2 , "Powerage"); 54 insert into t1 values( 3 , "Singing Down the Lane" ); 55 insert into t1 values(4 , "Ziltoid the Omniscient"); 56 insert into t1 values(5 , "Casualties of Cool"); 57 insert into t1 values( 6 , "Epicloud"); 58 insert into t1 values(7 , "Somewhere in Time"); 59 insert into t1 values(8 , "Piece of Mind"); 60 insert into t1 values( 9 , "Killers"); 61 SELECT a, REGEXP_LIKE(b, '^P') from t1; 62 a regexp_like(b, ^P) 63 1 true 64 2 true 65 3 false 66 4 false 67 5 false 68 6 false 69 7 false 70 8 true 71 9 false 72 drop table t1; 73 create table t1(a int, b varchar(100)); 74 insert into t1 values(1 , "PowerSlave"); 75 insert into t1 values(2 , "Powerage"); 76 insert into t1 values( 3 , "Singing Down the Lane" ); 77 insert into t1 values(4 , NULL); 78 insert into t1 values(5 , "Casualties of Cool"); 79 insert into t1 values( 6 , "Epicloud"); 80 insert into t1 values(7 , "Somewhere in Time"); 81 insert into t1 values(8 , NULL); 82 insert into t1 values( 9 , "Killers"); 83 SELECT a, REGEXP_LIKE(b, '^P') from t1; 84 a regexp_like(b, ^P) 85 1 true 86 2 true 87 3 false 88 4 null 89 5 false 90 6 false 91 7 false 92 8 null 93 9 false 94 drop table t1; 95 select regexp_like('Cat', '*'); 96 error parsing regexp: missing argument to repetition operator: `*` 97 select regexp_like('CAT','cat','i') r; 98 r 99 true 100 select regexp_like('\n','.','n') r; 101 r 102 true 103 select regexp_like('abc\ndef','^def','m') r; 104 r 105 true 106 select regexp_like('CAT','cat','iiiiiiic') r; 107 r 108 false