当前位置:网站首页>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 |
边栏推荐
猜你喜欢
If the account number or password is entered incorrectly for many times, the account will be banned.
uni-app进阶之样式框架/生产环境【day10】
剑指offer基础版 ----- 第25天
Redis 事务学习有感
vulhub靶场学习日记hackme1
leetcode-每日一题565. 数组嵌套(标记图和并查集)
Quickly master concurrent programming --- the basics
第7章 网络层第3次练习题答案(第三版)
leetcode-每日一题745. 前缀和后缀搜索(哈希和字典树)
10 【组件编码流程 组件自定义事件 全局事件总线】
随机推荐
C language tutorial (1) - preparation
Redis first meeting
(Crypto必备干货)详细分析目前NFT的几大交易市场
第7章 网络层第1次练习题答案(第三版)
【Elastic-Job】分布式调度任务概览篇
运用flask框架发送短信验证码的流程及具体代码
剑指offer基础版 --- 第22天
【C语言趣味小游戏——猜数字】
剑指offer基础版 --- 第21天
数据库上机实验4 数据更新和视图
元宇宙的前景及四大赛道
字符串的扩展
uni-app进阶之样式框架/生产环境【day10】
碎片化NFT(Fractional NFT)
Flask-based three-party login process
踏上编程之路,你必须要干的几件事
wpf wrapPanel居中并从左到右排列
Swordsman Offer Special Assault Edition --- Day 3
继承、Super,重写、抽象类、抽象方法 1(第七天)
联盟链的真实场景在哪里