当前位置:网站首页>regular expression
regular expression
2022-08-02 07:48:00 【Classmate Peng, she is at the same table】
Character group []
[Pp]ython can match Python python, that is, a string starting with P or p followed by python[0-9] is OKMatch all numbers between 0-9[0-9a-zA-Z] is to match all numbers lowercase letters uppercase letters[^0-9] means that it will not match 0-9[/-] Match special characters such as '-' through translation characters
When you want to match multiple special characters
For example[\[|\]|\-|\(|\)]match -----()[] Split by |
The following lowercase letters are replaced by uppercase letters, which is notThe meaning of [\d] means all numbers [\D] means no matching numbers[\w] means that both upper and lower case letters can be matched[\s] means matching spaces[\bwoaini\b] means that word boundaries will only match between words and spaces, that is, the wordWoaini will not work if it is followed by other alphanumerics. Special symbols can be 
Do not add [] and write ^python directly to indicate that the python at the beginning of the matching string will not be matched again if python appears later. For example, python123python can only match the previous python
python$ means match python at the end and cannot add special symbols including spaces. can match anything except \n?n indicates that this n can appear or not appear
{3} indicates the number of repetitions 3
such as \d{3}-\d{5}
{3,4} means it can match 3 or 4 if it is {3,}Match more than 3 numbers
eg
+Equivalent to {1,}
*equivalent to {0,}
Extract
(\d{4})-(\d{7})The corresponding data can then be extracted
边栏推荐
- Expert Insights | 3 ways to seize innovation opportunities in a downturn
- 【机器学习】实验3布置:贝叶斯垃圾邮件识别
- 实例027:递归输出
- 有关 sql中的 concat()函数问题,如何拼接
- 吃透Chisel语言.31.Chisel进阶之通信状态机(三)——Ready-Valid接口:定义、时序和Chisel中的实现
- 查看端口号占用
- 请教一下,Flink SQL ,JDBC sink 入 mysql 库,想要搞一个自增主键,要怎么写
- 【机器学习】实验4布置:AAAI会议论文聚类分析
- php删除一维数组中一个值
- Analysis of GCC compiler technology
猜你喜欢
随机推荐
“蔚来杯“2022牛客暑期多校训练营4,签到题NDKHL
2022.07.31(LC_6133_分组的最大数量)
实例030:回文数
自然语言处理 文本预处理(上)(分词、词性标注、命名实体识别等)
查找最大的n个文件
Analysis of GCC compiler technology
数据库概论之MySQL表的增删改查2
张驰课堂:六西格玛培训工具——箱线图
第06章 索引的数据结构【2.索引及调优篇】【MySQL高级】
Resolving C# non-static field, method or property "islandnum.Program.getIslandCount(int[][], int, int)" requires an object reference
yml字符串读取时转成数字了怎么解决
hdu1752 copy
See the picture to understand | How to choose sales indicators to measure the health of business growth
张驰咨询:企业实施精益管理的最大障碍,只把精益作为一种工具和方法
PMP新考纲通关秘籍,告别抓瞎
[Dataset][VOC] Male and female dataset voc format 6188 sheets
SQL server 2014 怎么一次性导出多个查询结果?
C#重点问题之Struct和Class的异同
php删除一维数组中一个值
MQ带来的一些问题、及解决方案



![WebGPU 导入[2] - 核心概念与重要机制解读](/img/8f/195a3b04912d8872d025df58ab5960.png)





