当前位置:网站首页>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

边栏推荐
- Learning notes: what are the common array APIs that change the original array or do not change the original array?
- 开发转测试:从0开始的6年自动化之路...
- Flutter Event 派发
- (二)面扫描仪与机械臂的手眼标定(眼在手外:九点标定)
- 微信小程序AvatarCropper 头像裁剪
- Fiddler packet capturing tool for mobile packet capturing
- 2022 zhongkepan cloud - server internal information acquisition and analysis flag
- 【荧光字效果】
- E. Two Small Strings
- C# 托管与非托管
猜你喜欢

解决ProxyError: Conda cannot proceed due to an error in your proxy configuration.

SSG framework Gatsby accesses the database and displays it on the page

Qt随手笔记(三)在vs中使用QtCharts画折线图

Fiddler download and installation

Node 内存溢出及V8垃圾回收机制

高斯消元求解矩阵的逆(gauss)

2019 ICPC Asia Yinchuan regional (water problem solution)

CSV data file settings of JMeter configuration components

After attaching to the process, the breakpoint displays "currently will not hit the breakpoint, and no symbols have been loaded for this document"
![[MySQL] understand the important architecture of MySQL (I)](/img/89/5fb595b0112fac987626857b76f9a4.png)
[MySQL] understand the important architecture of MySQL (I)
随机推荐
Gauss elimination for solving XOR linear equations
2020-12-29
阿里云技术专家郝晨栋:云上可观测能力——问题的发现与定位实践
antd TreeSelect获取父节点的值
Spolicy request case
Node 内存溢出及V8垃圾回收机制
Logical architecture of MySQL
配置ADCS后访问certsrv的问题
Qt随手笔记(三)在vs中使用QtCharts画折线图
在同一conda环境下先装Pytroch后装TensorFlow
Fiddler packet capturing tool for mobile packet capturing
2022 zhongkepan cloud - server internal information acquisition and analysis flag
RMQ学习笔记
POJ 1012 Joseph
Solve NPM -v sudden failure and no response
copyTo
Flutter Event 派发
Registration module use case writing
asp. Net using redis cache (2)
ie7设置overflow属性失效解决方法