当前位置:网站首页>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';
边栏推荐
- Multi table operation - sub query
- 投资理财适合女生吗?女生可以买哪些理财产品?
- 你做自动化测试为什么总是失败?
- Open3d European clustering
- Seven polymorphisms
- 图像超分实验:SRCNN/FSRCNN
- 【PyTorch预训练模型修改、增删特定层】
- 全网最全的新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
- 互联网公司实习岗位选择与简易版职业发展规划
- Use and install RkNN toolkit Lite2 on itop-3568 development board NPU
猜你喜欢
yolov5目標檢測神經網絡——損失函數計算原理
谜语1
[calculation of loss in yolov3]
[configuration method of win11 multi-user simultaneous login remote desktop]
MySQL splits strings for conditional queries
ABAP table lookup program
调查显示传统数据安全工具在60%情况下无法抵御勒索软件攻击
【云原生 | Kubernetes篇】Ingress案例实战(十三)
liunx禁ping 详解traceroute的不同用法
redis主从模式
随机推荐
ACID事务理论
Pytorch weight decay and dropout
【SingleShotMultiBoxDetector(SSD,单步多框目标检测)】
Multi table operation - sub query
Splunk configuration 163 mailbox alarm
pytorch-softmax回归
Reinforcement learning - learning notes 3 | strategic learning
Seven polymorphisms
Principle of persistence mechanism of redis
Seven ways to achieve vertical centering
Mmclassification training custom data
What is the difference between canvas and SVG?
Four operations and derivative operations of MATLAB polynomials
Hash tag usage in redis cluster
Uniapp + unicloud + Unipay realize wechat applet payment function
MySQL splits strings for conditional queries
多表操作-自关联查询
byte2String、string2Byte
【pytorch 修改预训练模型:实测加载预训练模型与模型随机初始化差别不大】
图像超分实验:SRCNN/FSRCNN