当前位置:网站首页>regular expression
regular expression
2022-07-26 09:46:00 【44w0】
1. qualifiers :(“ ?”,“ + ”,“ * ”)
?: The characters decorated in the front need to appear 0 Time or 1 Time , Modifier characters are optional
*: Characters decorated in front , appear 0 Times or times
+ : Decorated characters , appear 1 More than once
If you specify the number of modifier characters : ab{ Number of times }c
If you specify the number of occurrences of modifier characters, the range is [3,5]:ab{3,5} c
If you specify the number of occurrences of modifier characters, the range is 3 To infinity :ab{3,} c
–> If you decorate multiple characters Enclosed in brackets
namely : (ab){2,}c
2. or |
a(b|c): matching a Behind is b perhaps c String
3. Character class [ ]
[abc]: Match by abc Words that make up
Can be in [] Specified range inside :
[a-z]: All lowercase letters
[A-Z]: All capital letters
[0-9]: All figures
[a-zA-Z0-9]: All upper and lower case letters and numbers
if [^]: Match except the ones listed after the cusp 【 outside 】 The characters of
4. Metacharacters
A series of common character types defined in regular expressions
Most of them are \ start :
\d Represents a numeric character be equal to [0-9]
\w Characters representing words ( english 、 Numbers and underscores )
\s For the blank ( contain Tab And line breaks )
\b Represents the word character boundary
\B Represents non word character boundaries
\D Represents non numeric characters
\W Represents non word characters
\S Represents a non blank character
. Arbitrary character ( Does not include line breaks )
^ Match the beginning of the line
$ Match the end of the line
5. Greed matches laziness
Greedy matching : When matching, it will match as many characters as possible by default * + {}
Laziness matches : Add another one to the right of the matching symbol ?, Switch the default greedy matching to lazy matching

边栏推荐
- Node memory overflow and V8 garbage collection mechanism
- QT handy notes (VI) -- update interface, screenshot, file dialog box
- Sqoop【环境搭建 01】CentOS Linux release 7.5 安装配置 sqoop-1.4.7 解决警告并验证(附Sqoop1+Sqoop2最新版安装包+MySQL驱动包资源)
- Search module use case writing
- JS judge the data types object.prototype.tostring.call and typeof
- V-for dynamically sets the SRC of img
- Qt随手笔记(三)在vs中使用QtCharts画折线图
- 莫队学习总结(二)
- 【信息系统项目管理师】初见高项系列精华汇总
- Mo team learning notes (I)
猜你喜欢

电机转速模糊pid控制

SSG框架Gatsby访问数据库,并显示到页面上

Gauss elimination solves the inverse of matrix (Gauss)

matlab simulink实现模糊pid对中央空调时延温度控制系统控制

Gauss elimination

Node memory overflow and V8 garbage collection mechanism

解决npm -v突然失效 无反应
![[Online deadlock analysis] by index_ Deadlock event caused by merge](/img/67/0a02ad248c3ab21d3240e12aa23313.png)
[Online deadlock analysis] by index_ Deadlock event caused by merge

正则表达式

Qt随手笔记(三)在vs中使用QtCharts画折线图
随机推荐
面试突击68:为什么 TCP 需要 3 次握手?
AR model in MATLAB for short-term traffic flow prediction
解决IE7 & IE8 存储cookie问题
解决npm -v突然失效 无反应
Login module use case writing
A new paradigm of distributed deep learning programming: Global tensor
Neural network and deep learning-6-support vector machine 1-pytorch
云原生(三十六) | Kubernetes篇之Harbor入门和安装
EOJ 2020 January race E-number transformation
Mo team learning summary (II)
POJ 1012 Joseph
matlab中的AR模型短时预测交通流
Why does new public chain Aptos meet market expectations?
Audio and video knowledge
阿里云技术专家郝晨栋:云上可观测能力——问题的发现与定位实践
R语言ggpubr包ggsummarystats函数可视化分组箱图(自定义分组颜色)并在X轴标签下方添加分组对应的统计值(样本数N、中位数median、四分位数的间距iqr、统计值的色彩和分组图色匹配
Customize permission validation in blazor
Qt随手笔记(三)在vs中使用QtCharts画折线图
V-permission add permission
Flutter event distribution