当前位置:网站首页>Regular Expression Basics
Regular Expression Basics
2022-07-31 05:47:00 【not used to having you】
1. Regular expressions, also known as regular expressions.
English: Regular Expression, often abbreviated as regex, regexp or RE in code), a concept in computer science.Regular expressions are usually used to retrieve and replace text that matches a certain pattern (rule).
Regular Expression_Baidu Encyclopedia (baidu.com)
As I understand it, the correct rules are arranged correctly according to the rules you set.
2. Features of regular expressions:
a. Very flexible, logical and functional;
b. Complex control of strings can be achieved quickly and in a very simple manner.
c. For newcomers, it is rather obscure and difficult to understand.
| () | Like math, it means it's a whole |
| ^ | matches the beginning of the input string |
| $ | matches the end of the input string |
| . | Wildcard [represents any character][does not match newline] |
| * | Matches 0 or more times |
| + | Match 1 or more times |
| \ | Escape characters |
| | | A choice between two items |
6.Modifier
| /i | Case insensitive |
| /A | Matching rules must match from the beginning |
| /s | will match all characters |
| /x | Whitespace characters in regular expressions are ignored |
边栏推荐
猜你喜欢
随机推荐
04 【计算属性 侦听属性】
变量的解构赋值
Flask 的初识
在kali上搭建vulhub漏洞靶场
If the account number or password is entered incorrectly for many times, the account will be banned.
【C语言趣味小游戏——猜数字】
02 【el和data的两种写法 MVVM模型】
vulhub靶场学习日记hackme1
局部变量成员变量、引用类型、this,static(第五天)
剑指offer基础版 --- 第21天
uni-app进阶之模版语法与数据绑定【day7】
07 【内置指令 自定义指令】
剑指offer专项突击版 ---- 第1天
Three handshakes and four waves
05 【绑定样式 条件渲染 列表渲染】
PAT_乙级_真题练习_1007_素数对猜想
uni-app进阶之内嵌应用【day14】
C language tutorial (2) - printf and data types that come with c
基于flask的三方登陆的流程
剑指offer专项突击版 ---第 5 天









