当前位置:网站首页>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 |
边栏推荐
- 碎片化NFT(Fractional NFT)
- Redis 事务学习有感
- The interviewer asked me how to divide the database and the table?Fortunately, I summed up a set of eight-part essays
- 什么是 GameFi?
- 初识正则表达式
- vulhub靶场学习日记SickOs1.2
- 07 【内置指令 自定义指令】
- Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
- 第7章 网络层第3次练习题答案(第三版)
- C language tutorial (1) - preparation
猜你喜欢

leetcode-每日一题剑指 Offer II 041. 滑动窗口的平均值(队列模拟)

Volatility取证工具使用日记

剑指offer专项突击版 ---第 5 天

剑指offer基础版 --- 第22天

If the account number or password is entered incorrectly for many times, the account will be banned.

Redis管道技术/分区

leetcode-每日一题1252. 奇数值单元格的数目(模拟优化)

leetcode-829. 连续整数求和(数论)

剑指offer专项突击版 --- 第 4 天

leetcode-每日一题873. 最长的斐波那契子序列的长度(哈希和二分)
随机推荐
碎片化NFT(Fractional NFT)
Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
sqlmap注入教程 常用指令
leetcode-每日一题735. 行星碰撞(栈模拟)
NFT与数字藏品到底有何区别?
【C语言趣味小游戏——猜数字】
File operations in C language (1)
10 【组件编码流程 组件自定义事件 全局事件总线】
剑指offer专项突击版 ---- 第1天
正则表达式基础知识
gin框架学习-Casbin入门指南(ACL、RBAC、域内RBAC模型)
剑指offer基础版 --- 第21天
1D, 2D, 3D convolution operations in pytorch
数据库上机实验3 连接查询和分组查询
tf.keras.utils.get_file()
Qt Creator + CMake 运行调试总会自动 build 所有目标
gin框架学习-Casbin进阶之策略管理API使用方法
闭包(二)
C语言实验四 循环结构程序设计(一)
Proteus 8 Professional安装教程