当前位置:网站首页>MySQL regular expression
MySQL regular expression
2022-07-05 12:12:00 【ziyi813】
MySQL Regular expressions
Introduce
Regular expressions (regular expression) Describes a string matching rule , The regular expression itself is a string , Use this string to describe 、 To define rules , Matches a series of strings that conform to a syntax rule .
In development , Regular expressions are often used to retrieve , Replace the text that conforms to a rule .
MySQL Use REGEXP Keyword supports string matching with regular expressions .
Format
| Pattern | describe |
|---|---|
| ^ | Matches the start of the input string |
| $ | Matches the end of the input string |
| . | Matching elimination \n Any single character other than |
| […] | Character set . Matches any of the contained characters , for example :[‘abc’] Can match "plain" Medium a |
| [^…] | Negative character set . Match any character not included . for example :[‘abc’] Can match "plain" Medium p |
| p1|p2|p3 | matching p1 perhaps p2 or p3. for example :'z|food’ Can match "z" perhaps "food"."(z|f)ood" matching "zood" perhaps "food" |
| * | Matches the previous subexpression zero or more times . for example :zo* Can match "z" as well as zoo. |
| + | Match the previous subexpression one or more times |
| {n} | n Is a non negative integer , Matched definite n Time |
| {n,m} | m and n All non negative integers , among n <= m. Least match n Times and at most m Time |
The operation sample
-- ^ start Search for items with names beginning with sea in the item table
select * from product where pname REGEXP '^ The sea ';
-- . Match any single character
select 'abc' REGEXP '.b';
边栏推荐
猜你喜欢

mmclassification 训练自定义数据

Pytorch MLP

The most comprehensive new database in the whole network, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, flying Book Multidimensional table, heipayun, Zhix

什么是数字化存在?数字化转型要先从数字化存在开始

abap查表程序

Select drop-down box realizes three-level linkage of provinces and cities in China

【使用TensorRT通过ONNX部署Pytorch项目】

ABAP table lookup program

【云原生 | Kubernetes篇】Ingress案例实战(十三)

无线WIFI学习型8路发射遥控模块
随机推荐
Multi table operation - Auto Association query
JS for loop number exception
yolov5目標檢測神經網絡——損失函數計算原理
The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases
图像超分实验:SRCNN/FSRCNN
Take you two minutes to quickly master the route and navigation of flutter
【ijkplayer】when i compile file “compile-ffmpeg.sh“ ,it show error “No such file or directory“.
跨平台(32bit和64bit)的 printf 格式符 %lld 输出64位的解决方式
Linux安装部署LAMP(Apache+MySQL+PHP)
一类恒等式的应用(范德蒙德卷积与超几何函数)
【SingleShotMultiBoxDetector(SSD,单步多框目标检测)】
【load dataset】
Embedded software architecture design - message interaction
Simple production of wechat applet cloud development authorization login
Why learn harmonyos and how to get started quickly?
Vscode shortcut key
Linux Installation and deployment lamp (apache+mysql+php)
【TFLite, ONNX, CoreML, TensorRT Export】
Hash tag usage in redis cluster
[loss functions of L1, L2 and smooth L1]