github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/operator/regexp_operator.result (about) 1 SELECT 'Corn' REGEXP 'Corn' AS 'Corn'; 2 Corn 3 true 4 SELECT 'Acorn' REGEXP 'Corn' AS 'Acorn'; 5 Acorn 6 false 7 SELECT 'Corner' REGEXP 'Corn' AS 'Corner'; 8 Corner 9 true 10 SELECT 'Cheese' REGEXP 'Corn' AS 'Cheese'; 11 Cheese 12 false 13 SELECT 'Corn' REGEXP '^Co' AS 'Corn'; 14 Corn 15 true 16 SELECT 'Acorn' REGEXP '^Co' AS 'Acorn'; 17 Acorn 18 false 19 SELECT 'Cheese' REGEXP '^Co' AS 'Cheese'; 20 Cheese 21 false 22 SELECT 'Corn' REGEXP 'rn$' AS 'Corn'; 23 Corn 24 true 25 SELECT 'Acorn' REGEXP 'rn$' AS 'Acorn'; 26 Acorn 27 true 28 SELECT 'Cheese' REGEXP 'rn$' AS 'Cheese'; 29 Cheese 30 false 31 SELECT 'Corn' REGEXP '.' AS 'Corn'; 32 Corn 33 true 34 SELECT 'Cheese' REGEXP '.' AS 'Cheese'; 35 Cheese 36 true 37 SELECT 'Corn' REGEXP '^C.rn$' AS 'Corn'; 38 Corn 39 true 40 SELECT 'Crn' REGEXP '^C.rn$' AS 'Crn'; 41 Crn 42 false 43 SELECT 'Tweet' REGEXP '^Tw..t$' AS 'Tweet'; 44 Tweet 45 true 46 SELECT 'Tweat' REGEXP '^Tw..t$' AS 'Tweat'; 47 Tweat 48 true 49 SELECT 'Tweet' REGEXP '^Tw.t$' AS 'Tweet'; 50 Tweet 51 false 52 SELECT 'Twit' REGEXP '^Tw..t$' AS 'Twit'; 53 Twit 54 false 55 SELECT 'Tweet' REGEXP '^Tw.{2}t$' AS 'Tweet'; 56 Tweet 57 true 58 SELECT 'Tweat' REGEXP '^Tw.{2}t$' AS 'Tweat'; 59 Tweat 60 true 61 SELECT 'Tweet' REGEXP '^Tw.{1}t$' AS 'Tweet'; 62 Tweet 63 false 64 SELECT 'Twit' REGEXP '^Tw.{2}t$' AS 'Twit'; 65 Twit 66 false 67 SELECT 'Twet' REGEXP '^Twe*t$' AS 'Twet'; 68 Twet 69 true 70 SELECT 'Tweet' REGEXP '^Twe*t$' AS 'Tweet'; 71 Tweet 72 true 73 SELECT 'Tweeet' REGEXP '^Twe*t$' AS 'Tweeet'; 74 Tweet 75 true 76 SELECT 'Twt' REGEXP '^Twe*t$' AS 'Twt'; 77 Twt 78 true 79 SELECT 'Twit' REGEXP '^Twe*t$' AS 'Twit'; 80 Twit 81 false 82 SELECT 'Twiet' REGEXP '^Twe*t$' AS 'Twiet'; 83 Twiet 84 false 85 SELECT 'Tweit' REGEXP '^Twe*t$' AS 'Tweit'; 86 Tweit 87 false 88 SELECT 'Twet' REGEXP '^Twe+t$' AS 'Twet'; 89 Twet 90 true 91 SELECT 'Tweet' REGEXP '^Twe+t$' AS 'Tweet'; 92 Tweet 93 true 94 SELECT 'Tweeet' REGEXP '^Twe+t$' AS 'Tweeet'; 95 Tweeet 96 true 97 SELECT 'Twt' REGEXP '^Twe+t$' AS 'Twt'; 98 Twt 99 false 100 SELECT 'Twit' REGEXP '^Twe+t$' AS 'Twit'; 101 Twit 102 false 103 SELECT 'Twiet' REGEXP '^Twe+t$' AS 'Twiet'; 104 Twiet 105 false 106 SELECT 'Tweit' REGEXP '^Twe+t$' AS 'Tweit'; 107 Tweit 108 false 109 SELECT 'Tweet' REGEXP 'Tw|et' AS 'Tweet'; 110 Tweet 111 true 112 SELECT 'For Let' REGEXP 'Tw|et' AS 'For Let'; 113 For Let 114 true 115 SELECT 'Banana' REGEXP 'Tw|et' AS 'Banana'; 116 Banana 117 false 118 SELECT 'Cat' REGEXP 'Cat|Dog' AS 'Cat'; 119 Cat 120 true 121 SELECT 'Dog' REGEXP 'Cat|Dog' AS 'Dog'; 122 Dog 123 true 124 SELECT 'Doggone' REGEXP 'Cat|Dog' AS 'Doggone'; 125 Doggone 126 true 127 SELECT 'Banana' REGEXP 'Cat|Dog' AS 'Banana'; 128 Banana 129 false 130 SELECT 'Banana' REGEXP '(an)*' AS 'Banana'; 131 Banana 132 true 133 SELECT 'Land' REGEXP '(an)*' AS 'Land'; 134 Land 135 true 136 SELECT 'Cheese' REGEXP '(an)*' AS 'Cheese'; 137 Cheese 138 true 139 SELECT 'Banana' REGEXP '^B(an)*d$' AS 'Banana'; 140 Banana 141 false 142 SELECT 'Band' REGEXP '^B(an)*d$' AS 'Band'; 143 Band 144 true 145 SELECT 'Bald' REGEXP '^B(an)*d$' AS 'Bald'; 146 Bald 147 false 148 SELECT 'Bad' REGEXP '^B(an)*d$' AS 'Bad'; 149 Bad 150 false 151 SELECT 'Tweeet' REGEXP 'e{3}' AS 'Tweeet'; 152 Tweeet 153 true 154 SELECT 'Tweet' REGEXP 'e{3}' AS 'Tweet'; 155 Tweet 156 false 157 SELECT 'Tweet 123' REGEXP '[0-9]' AS 'Tweet123'; 158 Tweet123 159 true 160 SELECT 'Tweet ABC' REGEXP '[0-9]' AS 'TweetABC'; 161 TweetABC 162 false 163 SELECT 'Tweet 123' REGEXP '[A-Z]' AS 'Tweet123'; 164 Tweet123 165 true 166 SELECT 'ABC' REGEXP '[A-Z]' AS 'ABC'; 167 ABC 168 true 169 SELECT '123' REGEXP '[A-Z]' AS '123'; 170 123 171 false 172 SELECT '123' REGEXP '[1-3]' AS '123'; 173 123 174 true 175 SELECT '012' REGEXP '[1-3]' AS '012'; 176 012 177 true 178 SELECT '045' REGEXP '[1-3]' AS '045'; 179 045 180 false 181 SELECT '123' REGEXP '[^1-3]' AS '123'; 182 123 183 false 184 SELECT '012' REGEXP '[^1-3]' AS '012'; 185 012 186 true 187 SELECT '045' REGEXP '[^1-3]' AS '045'; 188 045 189 true 190 create table t1(a int, b varchar(100)); 191 insert into t1 values(1 , "PowerSlave"); 192 insert into t1 values(2 , "Powerage"); 193 insert into t1 values( 3 , "Singing Down the Lane" ); 194 insert into t1 values(4 , "Ziltoid the Omniscient"); 195 insert into t1 values(5 , "Casualties of Cool"); 196 insert into t1 values( 6 , "Epicloud"); 197 insert into t1 values(7 , "Somewhere in Time"); 198 insert into t1 values(8 , "Piece of Mind"); 199 insert into t1 values( 9 , "Killers"); 200 insert into t1 values(10 , "No Prayer for the Dying"); 201 insert into t1 values(11 , "No Sound Without Silence"); 202 insert into t1 values(12 , "Big Swing Face"); 203 insert into t1 values(13 , "Blue Night"); 204 insert into t1 values(14 , "Eternity"); 205 insert into t1 values(15 , "Scandinavia"); 206 insert into t1 values(16 , "Long Lost Suitcase"); 207 insert into t1 values(17 , "Praise and Blame"); 208 insert into t1 values(18 , "Along Came Jones"); 209 insert into t1 values(19 , "All Night Wrong"); 210 insert into t1 values(20 , "The Sixteen Men of Tain"); 211 SELECT a, b 212 FROM t1 213 WHERE b REGEXP '^Power'; 214 a b 215 1 PowerSlave 216 2 Powerage 217 drop table t1;