当前位置:网站首页>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 |
边栏推荐
猜你喜欢
随机推荐
剑指offer专项突击版 ---- 第2天
The process and specific code of sending SMS verification code using flask framework
字符串的扩展
C language tutorial (1) - preparation
Redis 事务学习有感
gin框架学习-Casbin进阶之策略管理API使用方法
剑指offer基础版 --- 第21天
08 【生命周期 组件】
剑指offer专项突击版 ---- 第 6 天
Redis:安装使用
三子棋讲解(C语言)
The TOKEN value of Kubernetes joining the cluster expires
leetcode-每日一题剑指 Offer II 041. 滑动窗口的平均值(队列模拟)
Kubernetes certificate validity period modification
gin框架学习-GORM框架进阶之CRUD接口(数据库增删改查操作)
数据库上机实验1 数据库定义语言
Anaconda configure environment directives
Quickly master concurrent programming --- the basics
uni-app进阶之模版语法与数据绑定【day7】
Oracle数据库中的“limit”查询