当前位置:网站首页>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';
边栏推荐
- [mainstream nivida graphics card deep learning / reinforcement learning /ai computing power summary]
- 互联网公司实习岗位选择与简易版职业发展规划
- mmclassification 训练自定义数据
- 【TFLite, ONNX, CoreML, TensorRT Export】
- What is the difference between canvas and SVG?
- Reading notes of growth hacker
- Automated test lifecycle
- Video networkState 属性
- 16 channel water lamp experiment based on Proteus (assembly language)
- 【yolov5.yaml解析】
猜你喜欢
![[singleshotmultiboxdetector (SSD, single step multi frame target detection)]](/img/c7/8ad64582e09683818171b625769f37.png)
[singleshotmultiboxdetector (SSD, single step multi frame target detection)]

查看rancher中debug端口信息,并做IDEA Remote Jvm Debug

Redis master-slave mode

Pytorch softmax regression

Multi table operation - sub query

1 plug-in to handle advertisements in web pages
The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases

Sentinel sentinel mechanism of master automatic election in redis master-slave

互联网公司实习岗位选择与简易版职业发展规划

Reinforcement learning - learning notes 3 | strategic learning
随机推荐
vscode快捷键
Want to ask, how to choose a securities firm? Is it safe to open an account online?
yolov5目標檢測神經網絡——損失函數計算原理
1. Laravel creation project of PHP
Design of music box based on assembly language
The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases
[upsampling method opencv interpolation]
codeforces每日5题(均1700)-第五天
pytorch-权重衰退(weight decay)和丢弃法(dropout)
16 channel water lamp experiment based on Proteus (assembly language)
Image hyperspectral experiment: srcnn/fsrcnn
Four operations and derivative operations of MATLAB polynomials
SENT协议译码的深入探讨
Intern position selection and simplified career development planning in Internet companies
【TFLite, ONNX, CoreML, TensorRT Export】
Which domestic cloud management platform manufacturer is good in 2022? Why?
ABAP table lookup program
Time tools
Swift - add navigation bar
Open3d European clustering